• Resolved docmartinhk

    (@docmartinhk)


    I’ve been using Super Page Cache for some years.

    Just having another try at boosting speed, and I noticed issue with one site: test cache reported problem with Cloudflare, even though connected. Around 5 percent cached on CF. After finding your page with info on low CF percentages, I had a look with Chrome, saw various cf-cache results for components of pages – some HIT, some MISS, some DYNAMIC.

    I saw there should be Cache Rules; but actually none. Tried reconnecting maybe three times, including new API tokens; also tried deactivating and reactivating the plugin. Eventually, I added the Rule manually, copying rule from another site [except the domain]. Test Cache then reported things working properly.

    Also looked for Page Cache rule; and there wasn’t one. Nor any rules for four other sites I have using this plugin. So I manually set them; and could not choose settings exactly as you describe. Could have Edge Cache for up to a month; but I thought maybe cache control from origin was more what is required. So rule became Cache Level: Cache Everything, Origin Cache Control: On.

    The CF cache percentage has since risen; around 20 percent now. Oddly, dashboard reporting just 1 object is cached. [I use Docket Cache; another site has well over 1000 objects reportedly cached in the dashboard.]

    So, some quirky behaviour. And I hope the page rule is fine; I rather think this follows an update by Cloudflare.

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

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

    (@baicusandrei)

    Hello @docmartinhk,

    Thanks for the really detailed write-up, that context helps a lot.

    First, on the cache count in the dashboard: that number isn’t related to Docket Cache or object caching at all, even though the wording is a bit confusing. It refers to how many pages/URLs have been stored by the plugin’s own Disk Page Cache, not the persistent object cache. So “1 object cached” just means only one page has been written to the disk page cache so far. That count climbs as more of your pages get visited and cached.

    Now, on the missing Cache Rules. The fact that none existed and you had to add them manually points to one of two things.

    1. Make sure “Enable Cloudflare CDN & Caching” is turned on under Settings – Cloudflare.

    This is the most common cause. If that option is off, the plugin won’t create or manage the Cache Rule for you, which would explain why no rule appeared on any of your sites.

    If it’s already on, try toggling it off, saving, then toggling it back on and saving again. As long as the token permissions are in order, the plugin should write the rule during that process.

    2. If it is on, the API token may be missing required permissions.

    The plugin needs specific permissions to create the rules automatically. If the token you’re using doesn’t have them, the connection will still succeed but the rules won’t be written. You can either check that your current token includes the permissions below, or create a fresh one:

    1. Log into your Cloudflare dashboard and go to My Profile then API Tokens
    2. Click Create Token and select the WordPress template
    3. Add the Cache Rules Edit permission under Zone
    4. Add the Transform Rules Edit permission under Zone
    5. Click Continue to summary, review the permissions, and click Create Token
    6. Copy the generated token and paste it into the plugin

    Once the token has those permissions, the plugin should be able to create and manage the Cache Rules on its own, so you won’t need to add them by hand.

    It’s also worth checking the plugin logs. If the rule failed to write because of a permissions issue, that failure should show up there, which would confirm whether the token is the cause.

    To check whether the rule has been written, you can look in your Cloudflare dashboard under Caching, then Cache Rules. That’s where the plugin’s rule will appear if everything is set up correctly.

    I hope this helps and sheds some light on what might be wrong!.Let me know how it goes!

    Thread Starter docmartinhk

    (@docmartinhk)

    Thanks Andrei; inc for the explanation of dashboard caching reports.

    Still weird behaviour on this site.

    Yes, toggled that “Enable Cloudflare CDN & Caching” on and off, including with fresh tokens created with these rules. And no rules written; so I wrote the Cache Rule manually.

    Also Page Rule; though as noted, no Page Rules for any of my five sites. Hope I got this correct.

    Also very weird with this site: it reports page caching is all fine; and pages seem to load fast. Also checked with Chrome, and I see report for spc-disk-cache HIT

    BUT the dashboard reports just one or zero objects cached [fluctuates]. And the fallback_cache folder mostly has only the one lonely index.php file. Makes me wonder if the disk page caching is using another folder in a related site, as if via another of my domains.

    I have tried preloading the disk cached pages; also visiting pages – including the one reporting HIT, but not found in fallback_cache.

    So, all rather weird. I’m about to reset settings, see if that helps. Next thing would seem to be uninstalling and reinstalling the plugin.

    And just to note: no other page caching plugin operating. I have WP Optimize, restricted to table functions, and just checked, seen its page caching is indeed off.

    Thread Starter docmartinhk

    (@docmartinhk)

    After resetting Super Page Cache settings, seems things are about normal.

    Can see disk page cache files in the fallback_cache folder

    Cache Rule created – so I deleted the one I manually created [which was about a duplicate]

    But no Page Cache rule created, as with my other sites. I have left the rule I made:

    “Cache Level: Cache Everything, Origin Cache Control: On” Again, hoping this is correct.

    Plugin Support Andrei Baicus

    (@baicusandrei)

    @docmartinhk I now realize that I might have misunderstood. Super Page Cache does not set any Page Rules. It used to, but that has become legacy for a few versions. The caching should work allright without it being set. The Cache Rule should handle everything as expected.

    I hope this helps!

    Thread Starter docmartinhk

    (@docmartinhk)

    Well, you didn’t understand about disk caching not working, or the cache rule not being created. Even with test cache reporting all seemed well.

    Nor have we figured why resetting the settings enabled these to happen as expected.

    You had overlooked my mention of the page cache rule; thanks for noting about this. I had found info in your troubleshooting guidance about checking this rule: maybe you can search through your info and update or remove it.

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

You must be logged in to reply to this topic.