How Do You Clear the Cache?

Status
Not open for further replies.

Picky1999

Chieftain
Joined
Nov 7, 2005
Messages
32
I've very sorry to have to ask this but I see it repeatedly mentioned as a fix some game performance issues and wondered:

How does one go about "clearing the game's cache"?

I remember seeing this explained in one of umpteen fix-it threads but it has become buried over the test of Time...

thank you in advance.:)
 
Open the "C:\Documents and Settings\YOUR_COMPUTER_NAME\Application Data\My Games\Sid Meier's Civilization 4\cache" folder and delete the contents.
 
Stuie said:
Open the "C:\Documents and Settings\YOUR_COMPUTER_NAME\Application Data\My Games\Sid Meier's Civilization 4\cache" folder and delete the contents.


C:\Documents and Settings\YOUR_USERNAME\Application Data\My Games\Sid Meier's Civilization 4\cache
 
Actually, in my case, there's cache located under both User\Application Data\My Games\ and User\Local Settings\Application Data\My Games\. At first I wasn't able to understand why the cache persisted to exist, even though I cleared User\App... so I made a search and that's what I found.
 
Not sure about shift. LOL. Errm... so anyway, I wrote up this nice little batch script that should clear all Civ4 caches (for sure).
Spoiler :
Code:
@echo off
:: Set Silent to 1 to always run silently...
set silent=0
:: Analyze any potential argument...
if %silent%==1 goto skipbs
if %1.==. goto bs
if %1==s goto set_silent
if %1==silent goto set_silent
if %1==-s goto set_silent
if %1==-silent goto set_silent
if %1==/s goto set_silent
if %1==/silent goto set_silent
if %1==h goto help
if %1==help goto help
if %1==-h goto help
if %1==-help goto help
if %1==/h goto help
if %1==/help goto help
goto bs
:set_silent
set silent=1
goto skipbs
:bs
cls
@echo. +---------------------------------------------.
@echo. :                                             :
@echo. : Civilization IV - Clear Caches Batch Script : 
@echo. :  Script by: krille @ CivFanatics.com, 2008  :
@echo. :                                             :  
@echo. : Description: Clears the game cache of Civ4  :
@echo. :  original/vanilla, Warlords and BtS.        :
@echo. :                                             :
@echo. : Params: -s for silent mode, -h for help.    :
@echo. :                                             :
@echo. '---------------------------------------------'
@echo.
@echo. The following directories will be deleted:
@echo.
@echo. %APPDATA%\...
@echo.  My Games\Sid Meier's Civilization 4\cache
@echo.  My Games\Walords\cache
@echo.  My Games\Beyond the Sword\cache
@echo.
@echo. %USERPROFILE%\...
@echo.  Local Settings\Application Data\My Games\Sid Meier's Civilization 4\cache
@echo.  Local Settings\Application Data\My Games\Walords\cache
@echo.  Local Settings\Application Data\My Games\Beyond the Sword\cache
@echo.
set /p input= Are you sure? Enter 'y' to confirm. Anything else aborts. y/n: 
if %input%.==. goto abort
if %input%==y goto skipbs
if %input%==Y goto skipbs
goto abort
@echo.
@echo.
:skipbs
@echo.
rmdir "%USERPROFILE%\Local Settings\Application Data\My Games\Sid Meier's Civilization 4\cache\" /s /q
rmdir "%USERPROFILE%\Local Settings\Application Data\My Games\Warlords\cache\" /s /q
rmdir "%USERPROFILE%\Local Settings\Application Data\My Games\Beyond the Sword\cache\" /s /q
rmdir "%APPDATA%\My Games\Sid Meier's Civilization 4\cache\" /s /q
rmdir "%APPDATA%\Walords\cache\" /s /q
rmdir "%APPDATA%\Beyond the Sword\cache\" /s /q
@echo.
if %silent%==1 goto silent_end
@echo.
@echo Up to six 'errors' above is perfectly normal.
@echo (A directory can't be deleted if it doesn't exist.)
::cls
@echo.
@echo All Civilization 4 caches should now be cleared.
@echo (Including Warlords and BtS caches).
goto end
:help
@echo.
@echo.
@echo HELP
@echo.
@echo Use -s or -silent or s or silent for silent operation.
@echo.
goto silent_end
:abort
cls
@echo.
@echo Operation aborted.
:end
@echo.
@echo.
PAUSE
:silent_end

Use -s (can easily be done using a shortcut) to run silently (not prompts) or simply change "set silent=0" to "set silent=1" to always run silently.

Hope this can be of some help to someone.
 

Attachments

  • Civ4_Clear_Caches.zip
    2.8 KB · Views: 1,347
Is there a way to tell Civ to always clear the cache at startup? An ini file setting or a switch passed at startup?
Not that I'm aware of.

You could make a batch script though, to run the above clear caches batch script first and then launch Civilization.
 
I can't find my cache folder. It isn't in either of the places listed. This is annoying as I made some changes to this mod I made and they don't seem to be taking place even though I'm certain they should be. Is there anywhere else the cache could be?

PS: I also tried the hold shift fix.
 
I don't know anything about how these computer thingies work (elves?) and I'm not hep to the lingo, but by "cache" do you mean that gigantic reservoir of saved games and turnsets that have accumulated over the years? That's something I'd love to delete (especially the ones that didn't go so well).
 
No.

The cache refers to a bunch of files that the elves, er, your computer leaves "pre-built" from the last time you played Civ. These are, for the most part, unintelligible, gobbly-. .. .. .. . files used by the program itself.

However, in your SAVES directory (usually My Documents/My Games/Whatever-Version-Of-Civ-You're-Playing/Saves), you will have all of the old game saves that you haven't deleted, and cleaning that out occasionally is probably a good thing.
 
Sorry to post in this old thread but I wanted to clear my cache and can't find it. I looked in C:\Documents and Settings\Bill\Application Data but there isn't a "My Games" folder. I have one in My Documents but no Cache folder. I did a search on my entire computer and don't seem to have one. I enabled the computer to show all hidden folders and files but still don't see anything.
 
If you want to clear out the Hall of Fame it's located in "Replays" a few directories up from "Saved Games" (or "Saves"; I don't have my game here.) I don't know the entire list of directories, but you should be able to use a file and folder search to find it.
 
Never mind, I didn't realize how old this thread is before posting. Plus Ori already mentioned what I was going to say. So did I in fact.
 
For those still plugging away at this game on a newer system use:

\Users\Main\AppData\Local\My Games\Warlords\cache

or

\Users\Main\AppData\Local\My Games\Beyond The Sword\cache

if on a Windows 7/Vista machine.
 
Status
Not open for further replies.
Top Bottom