• Resolved ch4ye

    (@ch4ye)


    Hi.
    I noticed an issue which, quite frankly might have always been there and i did not notice or just popped up with some recent updates.

    1. When cache of page is cleared from toolbar or post made or updated, it obviously clears all related cache. The one thing it does not do, is clear home paged pages.
    This creates situation that if home page is domain.com, then archived pages of that are domain.com/page/2, domain.com/page/3
    They are never cleared and they keep outdated content on those pages regardless if new ones are appearing on page 1 or not. I can easily clear cloudflare cache but that won’t help because the culprit is disk cache, that simply cannot be deleted.
    Also any archive pages, like category/home/tags if you clear cache of that page from toolbar it obviously does not clear cache of that page, it clears cache of last post on that page, which in case of category tags, as related content will clear the cache of that archive as well. That does not work for home /page/2 up.

    2. Another thing is, i would hope you could implement the most simple, delete cache of url option, toolbar clear cache does not work properly in many cases, especially with lets say deleted urls. It would be so much simpler if one could simply type url which would have disk cache deleted .
    Otherwise the only choice is clear whole cache and that will not clear cloudflare cache due to hit limits, which leaves force all cache which is worst option of all, considering it will clear all images and everything cached on cloudflare.

    3. In the older version there was list of cached urls, (disk cache) that one could easily copy and then use cloudflare api to clear them by splitting them. Now new versions only show 1000 posts and they are not even in easy format to copy. Is there any way to bring all currently cached pages list back? As i described above regular clear cache simply does not help clearing cloudflare cache due to limits.

    cheers

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Andrei Baicus

    (@baicusandrei)

    Hello @ch4ye,

    Thanks for the really detailed write-up. This is genuinely useful feedback, and you’ve identified the behaviour correctly on all three points. Let me go through them.

    1. Paginated and archive pages keeping stale content

    This is a real limitation in how the free version scopes purges. When you update or publish a post, we purge that post’s URL plus a set of related pages, but the paginated tail of the homepage and archives (/page/2, /page/3, and so on) isn’t reliably included. Since the disk (fallback) cache is what serves those stale pages, clearing Cloudflare alone won’t fix it, which matches what you saw.

    The premium version has tag-based purging, which handles this case: home, blog, and archive pages are tagged and invalidated together rather than just clearing “the last post on the page.” If you’re on the free version, a full cache purge is the reliable workaround for the paginated pages until the granularity improves there too.

    1. “Delete cache for a single URL”

    We don’t have this today. It’s a reasonable request, type in a URL and drop its disk cache, and it covers the cases where the toolbar purge falls short (deleted URLs, pages that aren’t related to anything). I’ve logged it.

    1. The list of cached (disk) URLs

    That list still exists. On the plugin Dashboard, the Cached Objects card has a View link that opens a “Cached Pages” panel listing your disk-cached URLs with timestamps and a per-URL copy button.

    It appears when “Purge HTML pages only” is enabled (Settings → Advanced), and it shows up to the most recent 1,000 URLs.

    I hope this helps! Have a great day ahead!

    Thread Starter ch4ye

    (@ch4ye)

    Hi, thank you for your answer.

    1. Paginated and archive pages keeping stale content

    I looked into multiple options how to achieve the goal of having updated paged content.
    One of those was using something like this

    add_filter( ‘swcfpc_post_related_url_init’, function($listofurls) {return array_merge($listofurls,[‘https://domain.com/page/2′,’https://domain.com/page/3′,’https://domain.com/page/4′,’https://domain.com/page/5’,]);});

    But sadly that is hardly a good solution. This adds those home paged pages to every related posts purge. Which seems to work, but most of the time no need to clear those pages to be honest.
    The perfect solution would be clear only paged pages if they exist as fallback cache. As in most cases if fallback cache exists then there might be CF cache, but if it doesn’t there will be no CF cache. The same issue exists for related paged pages like tags categories, it clears up to 10th page, which can be changed, but it does not check if cache exists it just adds the list of all possible options. So lets assume post would have 10 tags and categories it might put up 100 urls to be purged with one click. While most won’t be cached in the first place.
    It seems simple, but not sure how hard it would be to change it or even just modify with some filter. As additional check when urls are added to purge or preload, it checks if they exists in fallback cache and if they aren’t it skips them.

    2. Tag-based Purging
    That sounds interesting, i looked into this feature, seems it’s what CF itself uses to allow purging as alternative to purging by url. Based on the doc, when activated in SPC it adds tag headers to all the pages. But as i looked it does not say anything about replacing regular clear cache by url, which happens on every post update. Can you confirm how it works? Because i can see that it can be used in SSH to clear cache based on tags, but what would be useful is if it actually replaced regular purge by url, so when i update post, all related tags would be cleared. Which would be much less requests, and would be better at clearing paged pages. But if it does not replace purge by url then its much less useful.

    3. Purge Whole Cache
    In the first place this whole thing is an issue to me because clear all cache fails to clear all cloudflare cache because of the CF limits of the urls to be purged at once. It happens because there are thousands of urls as fallback cache.
    I tried ‘Disable cache purging using queue’, as YES/NO. But somehow it fails me. It might delay initiation of the request but still kinda clears too many at once. And if that happens the next step is to use Force full cache which will destroy all cached images as well.

    4. The list of cached (disk) URLs
    In the older version before the bigger visual change in Version 5.1.0. There was a simple list of all urls not just 1000, and i was able easily copy paste the list. Then it was just simple script for clearing this list in cloudflare without hitting limits of requests. I cannot do that with this version when it shows only 1000. I think some time ago i did test that once rolled back to the earlier version it still shows all urls, so the urls are there, the plugin just chooses to only show 1000.
    If there was maybe simple button like download all cached urls as txt. That would be useful. Think it would be simple to add.


    5. Delete cache for a single URL
    That would be very useful because there are times that i would want to clear just one url, i cannot do that now. There are also sometimes some rogue urls, that are close to impossible to clear without full clear. Even the home page paged pages could be easily updated this way even though it’s not really fix of the issue but it solves the worst case of having outdated page. That would be nice feature to have.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.