What is the limit on the # of cache files EE keeps?
Posted: 06 October 2008 08:00 AM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  596
Joined  12-10-2006

It’s amazing what you can discover on the forums at 1 o’clock in the morning grin

Over here, Nevin from EngineHosting wrote:

EE has a limit on the # of cache files it will keep.  Once that limit is reached it flushes ALL of the cache files and starts to regenerate them.  If you have a really busy site, with a lot of templates cached, you can end up with templates that are never being cached for more than a minute or so no matter what you set to keep them for.

That is a VERY helpful nugget of information!

Does anyone know:

1) What the limit is for the number of cache files?

2) If this limit is installation-wide, or site-wide (i.e. if using MSM)?

Thanks! And I recommend reading the rest of Nevin’s post!

- Ad

Profile
 
 
Posted: 06 October 2008 11:09 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23522
Joined  05-20-2002

If it’s not set, 1,000.  And you can’t set it above 1,000 or it defaults back to that.  Once you’ve got more than that in the ‘page_cache’ cache folder, it clears that folder.

Since all sites share a page cache normally, it would be cumulative. 

That help?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 06 October 2008 05:56 PM   [ Ignore ]   [ # 2 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  596
Joined  12-10-2006

Thank you Robin

If it’s not set, 1,000.  And you can’t set it above 1,000 or it defaults back to that

Where is this set? I couldn’t find it in the docs.

Profile
 
 
Posted: 06 October 2008 06:18 PM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23522
Joined  05-20-2002

In truth, I’m not sure the docs specify the max number.  It is noted in the setting, though- ‘Admin- System Prefs- General Config’:

Maximum Number of Cachable URIs
If you cache your pages or your database, this preference limits the total number of cache instances in order to prevent your cache files from taking up too much disk space. 150 is a good number for a small site. If you have a large site and disk space is not an issue you can set it higher (over 300). We have an internal limit of 1000 regardless of your preference.

You can find the code in core/core.templates.php.

That help?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 06 October 2008 06:25 PM   [ Ignore ]   [ # 4 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  596
Joined  12-10-2006

Ah! And even more lightbulbs!

Thanks Robin. Fine to close this.

Profile
 
 
Posted: 06 October 2008 06:31 PM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12381
Joined  04-29-2002

Glad Robin was able to answer your question. Please don’t hesitate to post again if needed.

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64912 Total Logged-in Users: 25
Total Topics: 81864 Total Anonymous Users: 13
Total Replies: 440103 Total Guests: 171
Total Posts: 521967    
Members ( View Memberlist )
Newest Members:  bjmohrAqua193Bios Elementmjpoteetguimogranwelshmrcfthenetmonkeybenekwhobutsb