WordPress.org

Support

Support » Plugins and Hacks » Cache files are never deleted

Cache files are never deleted

  • I upgraded W3TC to the last v0.9.2.11 but generated cache files are never deleted and Empty All Caches option still doesn’t work.

    Namely, cache files created in /wp-content/wp-content/cache/page_enhanced/site-name are never deleted, neither automatically nor after Empty All Caches is run manually, so that causes number of inodes on a sever increases dramatically.

    Permissions are valid so this is not the cause of the problem.

    http://wordpress.org/extend/plugins/w3-total-cache/

Viewing 15 replies - 1 through 15 (of 15 total)
  • Did you have any joy investigating this? I’m not having much luck with the garbage collection removing pages that should be expired.

    Unfortunately, I didn’t find solution and what causes it although this problem exists since two versions ago.

    I can confirm this, inode count on my server went way up and I was investigating the case, I discovered that for past two month wp-content/cache/page_enhanced/site-name has swollen into a monster with files ending in *.old – clear cache doesn’t work, only way is to manually clean the folder.

    Funny part is that, rm -r wp-content/cache/page_enhanced/site-name/* was behaving weird because of sheer volume of files! I could see it finished working, but files where still there…

    Anyhow, this is major oversight and will surely cause problems to folks on shared hosting. They all limit inode count per account, you can even get suspended.

    Yes, it definitely causes the problem on shared hosting. In fact, I already have a lot of problems because of blocked accounts. The only solution so far is to use cron jobs on daily base to clean cache files.

    Plugin Author Frederick Townes

    @fredericktownes

    What are your settings for BrowserCache HTML expiration time? The plugin checks if file is older than current time minus 5 times the expiration time before it deletes the .old files during the garbage collection run.

    Also what value do you have under garbage collection interval on Page Cache settings page?

    Do you have any issues with scheduled posts since both that and the garbage collection relies on wp-cron?

    Hi Frederick,

    Here are answers/comments to your questions:

    “What are your settings for BrowserCache HTML expiration time?”

    – Some sites have the expiration time set to 3600 sec but some of them are with Browser Cache turned off. The behavior is the same.

    “The plugin checks if file is older than current time minus 5 times the expiration time before it deletes the .old files during the garbage collection run.”

    – As I can remember, three or four release ago this didn’t affect the cache file deleting if it was started manually (Performance -> Empty All Caches). In that case all files were removed no matter what the expiration time were. Is this changed in last few releases?

    “Also what value do you have under garbage collection interval on Page Cache settings page?”

    – Some sites have 3600 sec but some of them have values less than 1000. The behavior is the same.

    “Do you have any issues with scheduled posts since both that and the garbage collection relies on wp-cron?”

    No, I don’t have any issues with scheduled posts. They are published

    Please consider the following:

    – The issue with cached files exists no matter of environments. Sites are hosted on different hosting providers with different environments (shared, dedicated, Centos, Ubuntu…). Tried with different W3TC options but it didn’t help.

    – Manual deleting cache (Performance -> Empty All Caches) used to work before two or three latest versions, i.e. after manual deleting the cache files on disk were removed. Now, the manual deleting doesn’t delete the cache files located in /wp-content/cache/page_enhanced/%sitename%

    Any hope to see the “Empty all caches” option work again?

    I keep getting warnings of accounts suspensions because this plug ins creates > 9300 directories and never deletes anything.

    I used to press Empty all caches to (temporarily) fix the issue, now even that option is broken. It can’t be that hard to force delete stuff without looking at fancy cache timeout settings, is it?

    Most of all, is this plugin still being maintained? It used to get lots of features and fixes, now it seems to be dead.

    I have the same problem and i also can not delete the files via ftp. And i can not change the file permissions because of the group values.

    Here is the file permissions and groups for w3tc created files :

    permissions -> fle(755)
    group -> 502 503

    these values only exists on w3tc created files.

    Hi Frederick,

    Irrespective of settings, these files must be removed when “clear all cache” is clicked.

    I’m deactivated and deleted w3 total cache!
    Because this extension created on my blog : 85,456 Cache files and never deleted.

    I think this extension is not good for shared hosting blog’s.

    Sorry for my bad English.

    Nesell –

    When you deactivated W3 Total Cache, did it delete the Cache files? I’m having the same problem. My web hosting provider is telling me I need to get rid of files but I am not sure how to do that.

    @vmatt21 Unfortunately not… I have uninstalled W3TC, because my hosting suspended me < Toooooooo… many cache files, over inode limit >

    I have uninstalled W3TC from my blog
    And I have deleted cache files manually from ftp.

    Sorry for my bad english…

    W3 Total Cache never deletes ALL of it’s stored file on shared hosting nor does it remove ALL of those files when uninstalling.

    Garbage Collection works with wp-cron.php

    Its WP Pseudo Cron job script and not a Real Cron Job.

    It works and is triggered when you get traffic. No or low traffic and your in trouble.

    Create a Real Cpanel cron job to hit wp-cron.php which will also trigger garbage collection….

    https://support.hostgator.com/articles/specialized-help/technical/wordpress/how-to-replace-wordpress-cron-with-a-real-cron-job

    @rafaelmagic,

    May I have the comment and code to trigger wp-cron.php. Appreciated if you have the “hook” to trigger CSS & JS minify php script. I have HTTP gzip compression priblem.

    Thanks.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Cache files are never deleted’ is closed to new replies.