• Resolved Greendroid

    (@greendroid)


    Hi Team,

    thanks for the great caching plugin.
    Unfortunately I have recognized, that currently nearly 1.5 Million files are saved under …/wp-content/cache/object. Nearly 900k then under ./post-queries, 370k under ./term-queries and 60k under ./comment-queries.
    I frequently use the “Purge all caches” button, but it seems, that it doens’t have any effect on the files.
    I would be able to just delete the entire folder via SFTP. Would this harm the plugin or the status of my website? How do I mitigate, that such amount of files are created again?
    Previously I thought, that the “Purge all caches” button would delete all files and start from scratch.

    I am using PageCache:DiskEnhanced, Minify:Disk, DatabaseCache:Disk, ObjectCache:Disk, BrowserCache.
    Thanks in advance and kind regards

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @greendroid

    Thank you for reaching out and I am happy to help!
    Just to confrm, you are using the Disk Caching method for all caching modules?

    If this is the case, you can see the notification that Disk is not recommended fore OC and DB Caching and this is one of he reasons, because this is what persistant Object caching does.
    Do you have the ability to install php module for Redis or Memcached on your server and does the provider allows that on your current plan?

    Thanks!

    Thread Starter Greendroid

    (@greendroid)

    Hi @vmarko,

    thanks for your quick help. I configured this plugin once at the beginning after installation a few years ago and have never checked it again. Perhaps I overread the warning message at this point.

    But yes, you are right. I was using Disk for Page Cache, Minify, Opcode Cache, Database Cache and Object Cache.
    I have disabled the DatabaseCache and Object Cache now completely, as I don’t think that I have an option to use this. I am on a very basic webhosting package I cannot install additional modules on the server.

    Are these many files now deleted automatically or can I just delete the “cache” folder via FTP without harming my website?
    I have made a page speed check and it seems, that it is not much changed with the disabled caching methods, so the warning seems to be correct for my webpage.

    Am I correct, that when I click “Purge all Caches”, that all files on my server are deleted and the complete cache is built-up from scratch? Or do I need a cron job or similar to remove old files frequently?

    Thanks and kind regards

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @greendroid

    Thank you for your feedback.
    As I mentioned before, this is how the persistant cache works and there are a lot of Objects files created so when caching to disk, the files are created there.
    When you purge all cache, the files are not deleted. This is what is called stale cache. It makes sure that the users are still being served with the cached page to avoid increased server response times and bad user experience. Once the page is visited the newly created cache file is created.

    In all the cache management settings there is an option called Garbage collection interval: which is default 3600 seconds. Now depending on the configuration, this can create a lot of files and the files may not be removed if the cron kicks when another batch of files are created.
    This is not a problem with the Page Cache, however, depending on the website, a lot of objects may be cahed and this depends on the theme, plugins etc.
    This is why the best thing is to use memory-based caching when it comes to OC and DB Caching.
    I hope this helps!

    Thanks!

    Thread Starter Greendroid

    (@greendroid)

    Hi @vmarko,

    thanks again for your help. I have disabled the DatabaseCache and ObjectCache now completely. So in this regards no more files should be created.
    Can I now delete the /cache/ folder once, so that all the files are deleted properly? Then I could start from scratch without such amount of files.
    I know, this would mean, that once these files are created the first visitor has a lack of performance which would be OK for us.
    I have seen, that my provider can activate Zend OPcache for our webpage. Will have a look and perhaps enable that together with the appropriate selection in W3TotalCache.

    Thanks again and kind regards

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @greendroid

    Thank yhou for your feedback.
    If the DB Cache and OC are disabled, then no files will be created. You can safely delete the entire /cache/ folder. This will remove all cached files, and the new files will be created depending on your configuration. And yes the first visit may be a bit slower as the cache needs to be created, however, you can enable cache preload in Performance>Page Cache and once enabled re-visite the website. This will trigger the cron.
    As for the Opcache, this is a read-only option in the W3TC. It will only detect if this option is available. You can purge Opcache via the W3 Total Cache if necessary.

    Thanks!

    Thread Starter Greendroid

    (@greendroid)

    Hi @vmarko,

    thanks for the confirmation. I will do that.

    Kind regards

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @greendroid

    You are most welcome!

    We would really appreciate it if you could take a minute and post a review here. This will help us to continue offering a top-notch product to users.
    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.