• Resolved webisimo

    (@webisimo)


    I have installed WP Super Cache (aching mode expert, I have added the .htaccess rule manually via ftp)

    When I check how the site is caching here:

    https://www.giftofspeed.com/cache-checker/

    Everything is being cached (via Cloudfare I think as it shows 31 days which is the setting I have there) however the home-page is showing only 3 seconds. Is there somewhere where I can change the max-age 3 to cache the homepage for longer? My cache Timeout is set to 7200.

    Thanks!

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Bruce (a11n)

    (@bruceallen)

    Happiness Engineer

    Hi @webisimo

    The max-age is a directive that tells the browser how long to cache a resource. By default, WP Super Cache sets the max-age to 3 seconds. However, you can change this setting in the plugin’s settings. To do this, go to Settings > WP Super Cache and click on the Advanced tab. In the Cache Headers section, you will see a field for Cache-Control Header. Enter the number of seconds you want the page to be cached in this field.

    For example, to cache the page for 30 days, you would enter max-age=2592000.

    Once you have entered the desired value, click on the Save Changes button.

    Note: If you are using CloudFlare, you may need to disable their caching in order for WP Super Cache to work properly

    @bruceallen ca nyou expand on the Cloudflare incompatibility?

    Plugin Author Donncha O Caoimh (a11n)

    (@donncha)

    @webisimo – The 3 second cache is only in your browser. The cache file on your server will be cached for however long you’ve defined in the Advanced Settings page.

    WordPress disables browser caching by default, so every time someone clicks refresh on your browser it fetches the page from your server. With a 3 second cache, the browser doesn’t fetch it until the page it downloaded is 3 seconds old. Not much, but I felt that if it was longer, then a visitor might miss updates on a page that updates very often.

    There are two caches – one in your browser (3 seconds), one in your server (an hour, a day, whatever you have set it to).

    @asafm7 – you may run into problems because Cloudflare will cache the page and WordPress will cache the page. In the past, I have seen it happen where an update happens on the server, is cached by WP Super Cache but for some reason Cloudflare didn’t pick up on the update. I think it is improved now, though.

    asafm7

    (@asafm7)

    Maybe Cloudflare’s cache can be bypassed for the WP Super Cache crawler? (using a user-agent rule, or another distinctive header)

    @asafm7 I don’t know if it can, but if you’re using Cloudflare to cache your pages, you probably won’t need WP Super Cache. On the other hand, this plugin is likely more flexible than depending on an external cache.

    I would be very interested to hear how you got on getting these two caches to work together.

    Plugin Support Stef (a11n)

    (@erania-pinnera)

    Hi @asafm7,

    Do you have updates about that? We usually close inactive threads after one week of no movement, but we want to make sure we’re all set before marking it as solved. Thanks!

    Thanks, @erania-pinnera, for checking.

    I haven’t gotten around it yet.

    I guess I will open a new ticket if I have issues.

    Thanks!

    Thread Starter webisimo

    (@webisimo)

    Hi @donncha, thanks for the info. we don’t update the page very often, just add a blog entry every couple of weeks, so is 3 seconds enough for an efficient cache policy?

    @bruceallen I tried to go here:

    Settings > WP Super Cache and click on the Advanced tab. In the Cache Headers section

    But can’t see the Cache Header section… have they changed the name of it to something else?

    Plugin Author Donncha O Caoimh (a11n)

    (@donncha)

    @webisimo – the 3 seconds is on the visitor’s side, in their browser, so it’s perfectly fine.

    Unfortunately, that Cache headers section does not exist. That was generated by an AI assistant working off incomplete documentation. The AI assistant will not be used in the future when answering questions here.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Homepage is only being cached for 3 seconds’ is closed to new replies.