• Resolved jazura

    (@jazura)


    Hello,

    I have cache preload “Automatically prime the page cache” enabled for a few days now. When checking the wp-content/cache/page_enhanced fold, I notice that really all pages are there. So it seems the automatic preload is working.

    Howver, a lot of them only have the html and gzip files with “_old” extension (the “_old” files themselves are generally a few hours old). Not the actual active html file itself. Only when I visit the specific page manually, this active html page appears in the cache folder.

    I suppose this means my pages are considered expired before they are cached again ? How can I have the cached page live longer ? Simply by adjusting the “expires header lifetime” for html ?

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

    (@vmarko)

    Hello @jazura

    Thank you for reaching out and I am happy to assist you with this.

    _old files are created when cache is purged.
    it’s fine to have _old files. if you always have only _old files – that’s a sign something purges cache all the time. like theme or some plugin.

    Can you enable the Purge Log for Page caching in Performance>General settings>Debug?

    Thanks!

    Thread Starter jazura

    (@jazura)

    Hello Marko,

    Thank you for your response !

    1. Purge Log is a W3 PRO feature. I am using the free version.
    2. I do not have ONLY _old files. It’s a mix. Some page cache folders have ONLY “_old” files. Some page cache folders have both the actual html + gzip AND “_old” files. Some page cahe folders have ONLY the actual html + gzip
    3. But whatever files any page cache folder has, they are all maximum a few hours old.
    4. I am not actively purging cache. And there are no actions taken that could trigger a purge (i.c. a post being published), I think.

    My current settings for cache preload are

    • automatically prime page cache: yes
    • update interval 900 seconds
    • pages per interval: 10
    • sitemap url : the full url to the yoast generated sitemap_index
    • preload post cache upon publish events: yes

    My questions now are:

    1. I would assume that all page cache stays active until it either expires or gets purged. Is that a correct assumption ? (and if so, what triggers the expiration of a page cache ? the “expires header lifetime” ? Or something else ?)
    2. Is a cache purge automatically done every time the automatic cache preload cycle starts ?

    • This reply was modified 3 years ago by jazura.
    pacoflaco

    (@pacoflaco)

    I have the same issue. I tried with a fresh WordPress installation and with only the W3 Total Cache plugin, but after 30 minutes, the cache files start to get the _old tag in the URL. Is there any other configuration to set to extend that? I only have the page cache enabled, and the rest is on default.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jazura @pacoflaco

    Thank you for your feedback. The cache is purged for a specific page when the the content is updated, and again possibly some other plugin is calling the flus_all

    You can consider disabling Cache control and set expires header in the Browser Cahe settings for HTML and see if this helps. If not, something other than W3TC is calling cache purge and again, this can be confirmed using a purge log.

    Thanks!

    pacoflaco

    (@pacoflaco)

    But the content is not updated and the only plugin on the installation is the W3 Total Cache. It’s a fresh WordPress installation.

    pacoflaco

    (@pacoflaco)

    I think I found the issue, I don’t know it’s a bug, or it is intended. Looking through the code I found this line:

    if ( !$this->_expire || $this->_expire > W3TC_CACHE_FILE_EXPIRE_MAX ) {
    $this->_expire = 0;
    }

    If you enter a number of seconds greater than W3TC_CACHE_FILE_EXPIRE_MAX (30 days), every time w3_pgcache_cleanup runs it is going to change the files to _old.

    abitofmind

    (@abitofmind)

    Thread Starter jazura

    (@jazura)

    Thanks @pacoflaco and @abitofmind for the input.

    @pacoflaco : setting everything at less than 30 days (in seconds) seems to have done the trick ! I have set all to 2505600 seconds and let it run over the last few days.

    All my page folders now have an active html and gzip cache that is recently (in the last few hours) created by the cache preloading. And no folders with only “_old” files.

    Thanks again.

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

The topic ‘preload only partially working’ is closed to new replies.