1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

How Do You Clear the Cache?

Discussion in 'Civ4 - General Discussions' started by Picky1999, Nov 23, 2005.

  1. Picky1999

    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.:)
     
  2. Stuie

    Stuie Laudir Agus Mir

    Joined:
    Sep 10, 2001
    Messages:
    551
    Location:
    Upper Gwynedd, PA
    Open the "C:\Documents and Settings\YOUR_COMPUTER_NAME\Application Data\My Games\Sid Meier's Civilization 4\cache" folder and delete the contents.
     
  3. Picky1999

    Picky1999 Chieftain

    Joined:
    Nov 7, 2005
    Messages:
    32
    Very good. Thanks.
     
  4. arioch99

    arioch99 Chieftain

    Joined:
    Sep 9, 2003
    Messages:
    77

    C:\Documents and Settings\YOUR_USERNAME\Application Data\My Games\Sid Meier's Civilization 4\cache
     
  5. krille

    krille CivDOS Fanatic

    Joined:
    Sep 5, 2005
    Messages:
    337
    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.
     
  6. ainwood

    ainwood Consultant. Administrator

    Joined:
    Oct 5, 2001
    Messages:
    30,009
    ...Or hold down SHIFT when you're starting the game (IIRC).
     
  7. krille

    krille CivDOS Fanatic

    Joined:
    Sep 5, 2005
    Messages:
    337
    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.
     

    Attached Files:

  8. Mknn

    Mknn Chieftain

    Joined:
    Dec 17, 2007
    Messages:
    281
    Location:
    Houston
    Is there a way to tell Civ to always clear the cache at startup? An ini file setting or a switch passed at startup?
     
  9. krille

    krille CivDOS Fanatic

    Joined:
    Sep 5, 2005
    Messages:
    337
    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.
     
  10. Moody

    Moody Chieftain

    Joined:
    May 16, 2008
    Messages:
    13
    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.
     
  11. mystikmind2005

    mystikmind2005 Chieftain

    Joined:
    Jan 31, 2006
    Messages:
    510
    If you want to clear out all your 'cash', just get a divorce!!
     
  12. Willem

    Willem Chieftain

    Joined:
    Feb 12, 2002
    Messages:
    7,313
    Location:
    Canada
    All that is really unneccessary. As Ainwood mentioned, all you have to do is hold down your shift key when Civ is booting up.
     
  13. bestbrian

    bestbrian Just this guy, ya know?

    Joined:
    Oct 4, 2007
    Messages:
    3,344
    Location:
    NYC
    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).
     
  14. Mknn

    Mknn Chieftain

    Joined:
    Dec 17, 2007
    Messages:
    281
    Location:
    Houston
    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.
     
  15. Astaldo711

    Astaldo711 Chieftain

    Joined:
    Dec 20, 2005
    Messages:
    106
    Location:
    Wildlands of NJ
    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.
     
  16. ori

    ori Repair Guy Super Moderator

    Joined:
    Dec 17, 2005
    Messages:
    15,878
    Location:
    Baden-W├╝rttemberg, Germany
  17. sydhe

    sydhe King of Kongs

    Joined:
    Nov 4, 2001
    Messages:
    2,424
    Location:
    Norman Oklahoma
    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.
     
  18. Willem

    Willem Chieftain

    Joined:
    Feb 12, 2002
    Messages:
    7,313
    Location:
    Canada
    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.
     
  19. Majyk

    Majyk Chieftain

    Joined:
    Jul 10, 2009
    Messages:
    6
    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.
     

Share This Page