• Resolved Aleksandar

    (@aivanov12)


    Hello. In the directory of my site */home/doxologi/public_html/wp-content/cache* there is a huge amount of files. They are about 20GB. Can you tell me what to do? I cleared the cache from the settings, but this huge folder is not cleared. I’m asking for help.

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

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

    (@vmarko)

    Hello @aivanov12

    Thank you for reaching out and I am happy to help!
    This may occur for various reasons. The most obvious thing I am seeing after inspecting your website is that you are using the Disk Caching method for Object Caching.
    There is also a possibility that you enabled the cache preload which preloads the pages and always serving newly cached pages to the visitors.
    Now the Garbage collection feature for both Page Caching and Object Caching is there for the old files to be deleted so you may want to check if the two corn is working properly.
    I would recommend using Memory based caching for Object Caching like Memcached or Redis instead of caching to disk and if you are on a shared server, keep the Object Caching disabled
    You can manually delete the /cache/ folder as once deleted new files will be generated again.
    I hope this helps!
    Thanks!

    Thread Starter Aleksandar

    (@aivanov12)

    And finally, what exactly do I need to adjust in the plugin settings to prevent the problem?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @aivanov12

    Thank you for the feedback. As I’ve mentioned, avoid using Object Caching if only option is to cache to disk.
    Make sure that your wp_cron is working so that the Garbage collection interval set for the Page Cache does its job.
    The default Garbage collection interval is set to 3600s
    Thanks!

    Thread Starter Aleksandar

    (@aivanov12)

    Do I understand correctly that I need to change the settings of these options. Please see the screenshots I provide.
    1. https://ibb.co/sqPG8KM
    2. https://ibb.co/bXR5tNQ
    3. https://ibb.co/NCh7KhV

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @aivanov12

    Yes, that is correct.
    You can leave Disk for Minify and Disk: Enhanced for Page Caching, however, you should use Memcached for Object Caching.
    You can of course use Memcached for Minify and Page Cache as well.
    Thanks!

    Thread Starter Aleksandar

    (@aivanov12)

    I adjusted the “Object Cache” setting and set it to “Memcached”. Then I deleted the huge folder with 20GB of cache files. Does this mean that I will no longer collect so many files that take up a lot of my server space?

    Thread Starter Aleksandar

    (@aivanov12)

    Unfortunately, the folder started filling up with a lot of files again …

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @aivanov12

    Thank you for the information.
    Can you please share which folders you have in the /cache/folder and how big the folders are at the moment?
    Are you using the Cache Preload by any chance?
    Thanks!

    Thread Starter Aleksandar

    (@aivanov12)

    Last night I changed the settings, as you told me, and then I deleted the entire cache folder. Today the folder is full again. Yesterday before I deleted it it was 20GB. Today, after it is full again, it is 2.8GB. Please see the screenshots.

    https://ibb.co/Q6qWQkd
    https://ibb.co/mHKLB27
    https://ibb.co/rwqbjxh
    https://ibb.co/yBkt89K

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @aivanov12

    Thank you for the information.
    As you can see, the pages are being cached. The page is cached once visited, and then it’s stored in the cache/page_enhanced folder.
    It appears that you have a lot of pages on your website and most probably the Cache Preload is enabled in Performance>Page Cache. What Cache preload does is that it’s caching the entire website over and over again.
    So it’s normal to have a lot of files in the /cache/ folder if you have a lot of pages on the website.
    If you do not want the pages to be cached on your server, you can also use Memcached for Page Caching. This way the cache will be stored in RAM so instead of using the disk, the pages will be served from the Memcached.
    I hope this helps!
    THanks!

    Thread Starter Aleksandar

    (@aivanov12)

    But won’t that take up all my RAM space? My ram memory on the server is currently 2GB, of which only 1GB is free and the other 1 is busy.

    Moderator Yui

    (@fierevere)

    永子

    memcached has eviction policy, it wont take more RAM than configured,
    old or least used entries will be automatically cleaned to free up memcached RAM

    see this for example details
    https://memcached.org/blog/modern-lru/

    Thread Starter Aleksandar

    (@aivanov12)

    Then what do you recommend? Set Memcached to Cache pages, or turn off Cache Preload?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @aivanov12

    That depends on your hosting plan.
    As the pages are cached once visited, turning off the Cache Preload means that the pages will not be cached after the cache is purged until visited. Cache Preload ensures that all pages in the sitemap are preloaded.
    If you have enough GB on the server SSD, then you can keep both Disk: Enhanced and Cache Preload.
    You can also use a custom sitemap where you can put the most recent pages, for example, the last 100 to be preloaded.
    I hope this helps!

    Thread Starter Aleksandar

    (@aivanov12)

    Now my CPU and RAM are full, which slows down the website. Isn’t it better to just turn off the “Object Cache” and “Cache Preload” options? Not to take up RAM memory and processor, and not to fill my memory with cache files? What would you advise me?

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Huge folder with cache files that is not cleared by the plugin settings’ is closed to new replies.