Sun

11

Jan

2009

1.5.9 Bugfixes or Features 2 - Purge Expired Cache

In addition to the features described by Mark Dexter there is also a new "Purge Expired Cache" menu/feature in backend that will come especially handy to the large site administrators. It is a supplement to the "Clean Cache" that has been already there - with the difference that "Purge Expired Cache" will only clean expired items - cache files that are older than number of minutes set by Cache Time limit in Global Configuration. Items that are still current will remain intact - and that is a real advantage of this option - cleaning them will not affect Joomla!'s performance gains that come from frontend  caching.

Purge Cache Administration

I would advise all administrators of Joomla! powered sites to use new option from time to time as number of unused cache files remaining in cache folder can rise very high especially with some components that use large number of URL parameters (e.g. events components). This happens because cache files are created on the URL basis - each combination of parameters creates new URL and each of them creates new cache file file - combined with web spiders like Google that try to index each and all of them numbers can get very high. There is another problem associated with events components (or any components dealing with items valid only for limited period of time) -  if event's don't expire numbers will rise fast - but still serve it's purpose - but if they do, you will get high number of unused cache files for any of the expired events (core com_content takes care of this and related problems by cleaning it's cache on every save).

Also if you make a new menu that links to the component and delete old one this will effectively change Itemids for all URL-s created by the component. As Itemid is a part of the URL this will create a whole new set of cache files,  but old ones will remain indefinitely - until you either clean or purge the cache.

39 Votes

14 Comments

Feed
  1. surly any decent caching system would take care of this internally without admin intervention? I doubt admins of big sites are going to login daily to hit this button - especially if its resource intensive !

    So much for not adding features...
  2. great! in effect, Joomla's had some troubles in past
  3. when i work on a site, i always click, global check in - clean cache before i leave, just to be sure..
    could we cron job this?:\
  4. yes how i can make cron job for this
  5. This was left to site admins precisely because it is resource intensive. Probably cron job would be the best solution, but not all people have access to cron's.
  6. Cache is building up very rapidly on my site. After one day, cache fills in all my remaining webspace. Cleaning up expired cache items really should be done automatically, via cron or some kind of plugin where cleaning intervals etc. can be set by the admin.
  7. Klas,
    I agree with Frank. I cleard my cache on Sunday have around 30 pages in 2 languages. Now Wednesday I have around 1400 files in the cache. After a purge 29 files are left.

    So I think too, a cron job for the purge would be a useful function.

    Regards
    Dieter
  8. In addition to the last comment (Dieter): after one day (25 hours) my cache folder on the server has nearly 850 MB (!!).
    The site itself has about 6.000 articles and 7-8.000 visitors each day.

    This overwelming increasing of the cache size cannot really be!
    I would have to pay more for the cache space as for the website itself!
    This must be solved soon, because logging in ans using this purge is one solution, but what if (e.g.) within 3 days nobody is doing that?!
  9. Without enormous storage resources, turning on the cache with an event calendar in operation creates mayhem. Not only did Joompack throw an error message without explanation but the log file was so big that it effectively stopped me from figuring out what was going on. I had to use FTP to blow away the log file and then investigate the caches by hand until I figured out that it was the com_events files that were the culprit. This is bad because the build up is so fast. Cron is not an option for me as it would be for many sites. My only option at present seems to be forgoing the cache altogether.
  10. Has it been solved yet? My site is creating 850 MB of cache and 25000+ cache files everyday and I have got notice from my hosting provider to fox that. Pls someone help.
  11. My webspace (500MB) was consumed up by the Joomla cache.
    It's ridiculous that Joomla does not even offer a simple cache limit setting! So switching off caching is the only option.
  12. My website without the Cache folder weigt bout 40MB .
    the rest 800 MB is Cache .
  13. I'm a newbie. Is there any harm to clearing my cache's? Will I lose any uesful data or anything? I was told by my hosting company I have a large amount of files.
  14. I agree, add limit cache function!!!

Add Comment


    • >:o
    • :-[
    • :'(
    • :-(
    • :-D
    • :-*
    • :-)
    • :P
    • :\
    • 8-)
    • ;-)