• Resolved HKP

    (@hiskingdomprophecy)


    Hi Corey,

    Cache Enabler is working well, but it seems now and again to be missing some WP-cron timings and not clearing the Cache on time.

    Perhaps the next update will fix that ??

    FYI, I changed my settings from 8 to 4 hours so the cache will clear more easily, but today I found that a cache size of 840Mb, which indicates a couple or more of the cron timings had been missed for whatever reasons.

    I was wondering if, together with your Cache Expiry Options, a Max-Cache Size Option would help overcome the results of a missed cron timing.

    As I mentioned previously. I find that when the cache is >300Mb, it can be hard to clear and it will generate massive error messages in the course of its execution.

    Below about 300Mb, typically no such error messages are issued and “Clear site Cache” and FVM’s “Clear Everything” work instantly.

    Just a suggestion for your consideration ??

    Regards and thanks,
    Angus

Viewing 6 replies - 1 through 6 (of 6 total)
  • Anonymous User 16850768

    (@anonymized-16850768)

    I’m sorry you’re experiencing this issue. As of version 1.7.2 the expired cache isn’t actually cleared. Instead, if the expired time has passed the cached page will not be delivered. It will be regenerated (so overwritten) and on the next request the updated cached page will then be delivered. This has changed in version 1.8.0 as there will be a WordPress cron scheduled (so a scheduled event and not a true cron) that will clear the expired cache automatically. That means in version 1.8.0 the expired cache will automatically be cleared on an hourly basis. This process involves scanning the cache and clearing any cached pages that are deemed expired (regardless of the actual expire time set).

    This was all introduced in PR #237. The nice thing about this PR is it also changed how the cache size is calculated, which I actually thought about this exact feature when implementing this change:

    It also paves the way to allow the cache to either be fully or partially cleared if the size reaches a certain level.

    So while this feature isn’t available yet, it was definitely on my mind. Having a max cache size unfortunately won’t make it in version 1.8.0, but at now least it will be very easy to extend Cache Enabler to add this until it makes it into the plugin. Once version 1.8.0 is released feel free to reply to this thread and I can help provide a simple code snippet that will introduce this functionality to your website.

    Thread Starter HKP

    (@hiskingdomprophecy)

    Hi Corey,

    Thanks for that teaching and update. I do appreciate it.

    While I add on average 10 new post per day, almost none are ever revised later – and if I do, I will clear that page on saving, to ensure folks get the new version. I then test it on my phone to double check that it is available and what the change looks like in reality. Sometimes the desktop and phone versions render a bit differently, as you know

    So the way I look at it is that a long expiry time and a large cache ought to be best for all – the user getting a fast delivery on a wide range of posts – the cpu working less.

    At them moment it all works well for me and I’ve got out load averages back to normal with an acceptable delivery speed. The only issue being that above 350Mb, it can be slow to clear the cache. But I can do it, and so am not concerned as I am getting benefits elsewhere.

    However, when the cache starts to get really large it seems to grow faster (though probably not in reality). So to get to 600Mb takes a while, but then 800 and 900 comes pretty fast and at >1GB, I start to wonder if the cache is perhaps too large for my resources. ??

    So typically I will clear out the cache at 800-900Mb.

    Thanks Cory for what you are doing with this. It is greatly appreciated and I do look forward to the day when the max-cache is available and I can set it and leave it. To me that will be a great combination of options.

    Yes, the user simplicity of Cache Enabler just suits me perfectly.

    Regards and thanks,
    Angus

    Thread Starter HKP

    (@hiskingdomprophecy)

    Hi Corey,

    I have to be honest here… and say that I just have a massive ‘facepalm’ moment when I finally worked out that the CE Cache is stored in /content/cache/ and not in RAM memory.

    That means that I have effectively no limit to the size of the CE Cache I can support, and further, it will not affect the site performance, even when very large.

    So I don’t need to worry about the size of the cache, as long as now, it is renewed occasionally for the benefit of users. In fact it is really only the author pages etc. with lists which need to be refreshed, as the posts never change.

    So my concerns about limiting my Cache were unwarranted. I only need to do that for administrative reasons. In normal use, CE will update as needed as you explained.

    Thanks again for your time. And just be assured, your input has been most appreciated.

    Regards and thanks,
    Angus

    Anonymous User 16850768

    (@anonymized-16850768)

    No problem, thanks for the update Angus. Have a wonderful weekend.

    “This has changed in version 1.8.0 as there will be a WordPress cron scheduled (so a scheduled event and not a true cron) that will clear the expired cache automatically.”

    Isn’t the previous version works better for large site? Let’s say we set cache expiry time to 1 hour. And we have hundred thousand post that expired. Doesn’t it will gives error if all of that page not finish to be deleted in 30seconds (default php time-limit)

    On previous version its more friendly to the server resources. Because it will gets deleted when the page requested. So it’s doing job one of a time. Which is very very resource friendly. Instead of doing all in one time

    • This reply was modified 3 years, 4 months ago by erikdemarco.
    Anonymous User 16850768

    (@anonymized-16850768)

    @erikdemarco, for completeness of this thread, I have replied to your other post here. ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Suggestion for Max Cache Size Option’ is closed to new replies.