There was a problem loading image hi_smashd.gif
There was a problem loading image dds_plugin_dl.gif

ManiaPlanet stores all in-game 3rd party content like cars, themes, skins and so on in a cache folder - which can grow to several Gigabytes in time. If the size of that cached content exceeds the configured maximum ManiaPlanet will ask you if it should raise that limit.

But I didn't want a several Gigabytes large cache from what I'll probably need 10% or less in the future, so I've set the cache folder to 4GB. This triggers the "cache full, should the maximum storage reserved for the cache set to a higher value" popup though.


Long story short:
I've set the chache to not exceed 4GB and to avoid the annyoing and frequently triggered popup I've written a quick'n'dirty batch file which will delete all cache files older than a given amount of days (default = 14) prior to starting the ManiaPlanet launcher. It's kind of a cache purger.

Maybe you'll find it useful as well, so here's the code:

@echo off

rem **** config ****
set gamefolder="G:\ManiaPlanet"
set cachefolder="G:\ManiaPlanet\_data\Cache"
set days=14

rem **** do not edit below this line ****

cd /d %cachefolder%
echo Deleting cache files older than %days% days
forfiles -s -m *.* -d -%days% -c "cmd /c del @path"

echo ************************************
echo *            Done...               *
echo ************************************
echo Starting ManiaPlanet...

cd "%gamefolder%"
start "" "%gamefolder%\ManiaPlanetLauncher.exe"
ping /n 4 >nul

To use it, create a file named eg. ManiaPlanet.bat in your ManiaPlanet folder and paste the above code into it.
Next you should configure the variables found at the top. That's it basically.

Note: The script makes use of the command line tool forfiles, which should be included in any default Windows installation of Windows XP, Windows 7 and also Windows 8.



blog comments powered by Disqus