• Resolved sotip

    (@sotip)


    Hi,

    I’m testing how page cache works with Redis and Enhanced Disk mode. The settings seems to be a bit confusing. I tried to search for these but most of the answers found doesn’t actually seem to be valid while testing the settings.

    REDIS PAGE CACHE

    The expiry seems to be set by the Maximum lifetime of cache objects, although at the bottom of the page there is a note saying The TTL of page cache files is set via the “Expires header lifetime” field. I tried to change the Expires header lifetime for HTML but this didn’t have any effect.

    Is this correct, that when using Redis this note at the bottom is not actually valid?

    ENHANCED DISK PAGE CACHE

    As the note says, Expires header lifetime should set the TTL for page cache. For testing I set the value to 10 seconds, but the page cache doesn’t seem to be creating a new cached html file for the page every 10 seconds.

    Here’s a screenshot of the settings when using Enhanced Disk cache.

    1. How does this actually work / what are we doing wrong as the 10s doesn’t seem to do the job?

    2. What are the correct settings for both Redis and Enhanced Disk cache to keep pages cached in server for an hour, but without browser cache for html?

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

    (@vmarko)

    Hello @sotip

    Thank you for your inquiry and I am happy to assist you with this.
    The page is cached and remains cached until the cache is purged for the entire cache or a specific page. The Page is cached once visited or if you are using Preload when the cron is triggered.
    So to answer your question the cache will expire when the cache is purged and a new set of cached pages will be created once the pages are visited.
    So the expires header is used for the browser Cache, not to create new cached pages.
    To conclude:
    The Page is cached once visited and remains cached in the /cache/ folder when caching to Disk with Disk: Enhanced. (Please note that Disk: Enhanced is better for page caching then Redis)
    The BC TTL is for browser Cache and not the files on the server.
    you can use Cache Preload to create a new set of cached pages on the server over the desired period of time using the sitemap and the interval set to cache pages.
    I hope this helps!
    Thanks!

    Thread Starter sotip

    (@sotip)

    Thanks for the reply Marko.

    It’s pretty clear now. If using Enhanced Disk cache, the expires header lifetime sets the TTL for pages and once they are expired garbage collection interval purges them.

    Thread Starter sotip

    (@sotip)

    Just out of interest, you mentioned that Enhanced Disk cache is better than Redis for page cache. Why is this exactly?

    Your documentation on GitHub seems to state the other way around.

    • This reply was modified 5 years, 5 months ago by sotip.
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Page cache settings’ is closed to new replies.