Cache file deleted - content updated - new cache file same?

Discussion regarding Joomla! 2.5 Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
whipkey
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Oct 19, 2007 8:57 pm

Cache file deleted - content updated - new cache file same?

Post by whipkey » Fri Oct 03, 2014 4:04 pm

I am working on a site in Joomla 2.5.9. This is a corporate site with multiple add-ons and custom work, so upgrading is not currently an option. We have 3 versions of the site as dev, staging, and production tiers. I have created some custom functionality to delete the specific cache file that corresponds to the article being pushed to the next tier. We need to do this because it doesn't make sense to clear the entire cache for just one page update. The part where it identifies the cache file and deletes it is working fine.

The site is using Conservative caching, set to File with a timeout of 700.

Here are my steps:
  • Clear the whole system cache.
  • Visit the page I am testing by directly typing in the URL.
  • I verify that the cache file has been created in the "page" sub-folder.
  • I update the article content.
  • I delete the cache file and verify it is gone.
  • I verify that in the database the article content is different than the cached version I just deleted.
  • I visit this page again in a different browser (to avoid issues with browser cache) and a new cache file is generated.
  • The page loads with the OLD CONTENT, not the new version.
How would the new cache file re-generate with old content that should no longer even be available? Is there an additional place where cached content is stored? If I clear cache from the Joomla admin it updates correctly, but remember the whole point is to keep the cache for everything that has not been updated. I just need to know where it is getting the outdated content to build the new cache file.

edit: This is a testing server getting no other traffic, just me.

whipkey
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Oct 19, 2007 8:57 pm

Re: Cache file deleted - content updated - new cache file sa

Post by whipkey » Fri Oct 03, 2014 5:29 pm

The answer:

Even with conservative caching on, com_content still caches the view separately in the folder "cache/com_content/". When the page cache file is deleted, it is rebuilt using any existing view cache file from that directory. If there is no cached view file, both are re-generated.

In my testing it seemed that deleting all files in the com_content cache folder did not interfere with the website or the cache performance. So I added to the process that it will delete all those files at the same time it deletes the individual page cache file. Seems to be working fine this way.


Locked

Return to “Performance - Joomla! 2.5”