• Resolved adambushell

    (@adambushell)


    We are using w3 total cache and have page cache setup correctly which works amazing well as our pages after being visited are cached for subsequent visitors. However if i revisit the same cached page a few hours later it is not cached and is slow for the first initial view until it creates a new cache.

    I tested this with a cron job that i left running that would visit a set of pages and the cache was saved but by the morning they were slow again until the initial visit.

    Here is the site:
    https://www.terzettostone.co.uk/product-category/porcelain-ceramic/natural-stone-tiles/

    Most pages are slow until you visit so my question is how do i debug this or is there a setup issue here. Screenshot of CMS below:
    https://i.snipboard.io/vFljhL.jpg

    Note i have only just disabled the “Automatically prime the page cache” option as this was not helping.

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

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

    (@vmarko)

    Hello @adambushell

    Thank you for reaching out and I am happy to assist you with this.
    Just to clarify, you are talking about the user experience on the website when browsing through pages?
    I’ve checked the website and as I can see the website and the user experience is great. I see that you are using Cloudflare and another CDN service to serve static content.
    Besides being cached on the server, pages should also be cached in the Browser Cache. I do not see a cache-control header or expires header set.
    If the pages are not cached in the browser cache, once you close the browser and then re-visit the website, naturally the browser will again try to fetch en content from the server.
    Can you please confirm you are using W3TC Browser Cache?
    The Page Cache files do not delete themselves. Once the Page is cached, and if you are using Disk: Enhanced, for example, the pages are cached and stored in wp-content/cache/disk_enhanced/yourwebsite.com
    The pages will remain there and will not change until the page cache is purged. Once the cache is purged, the pages will get the _old extension and will be deleted after 3600s as set in the Garbage collection interval.
    After that, if the Cache Preload is disabled, the pages will need to be re-visited in order to create a cached page.

    Thanks!

    Thread Starter adambushell

    (@adambushell)

    Hi thank you for the reply,
    If i go into incognito mode visit a page thats slow, then refresh and its fast i believe a cache file is taken. I have then closed the incognito mode down and revisited the site again and the slow page is now fast.

    Regarding page cache we are using Disk: Basic as we want to save “Cache URIs with query string variables” as the site has alot of search queries and ajax calls we want to cache.
    The only cache files we have are:
    wp-content/cache/page/6e2/ ect ect

    In this page folder we have about 120 cache folders and none of them are older than an hour or so.

    Could it be the type of page cache is very temporary? And if so can we have a better type that allows querys and ajax to be cached?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @adambushell

    If i go into incognito mode visit a page thats slow, then refresh and its fast i believe a cache file is taken. I have then closed the incognito mode down and revisited the site again and the slow page is now fast.

    I’ve checked your website on both incognito mode and regular. Every time I open the page the speed is the same.
    Disk: Enhanced is much faster than basic disk caching. You can try using memory-based caching like Redis or Memcached for Page Caching which also allows query string caching.
    And again, the browser caching appears disabled. I am not seeing a Cache-control header or Expires header for HTML.
    You should consider enabling those in W3 Total Cache Browser Cache settings. This is important because it
    As I’ve mentioned before you have several caching layers. So there is a possibility that something is purging the cache (W3TC does not do this based on your settings) and the _old files are created.
    Thanks!

    Thread Starter adambushell

    (@adambushell)

    Hi Marko,
    I enabled the Disk: Enhanced caching, added the cache control header as well and visited a few pages while not logged in to cache them. When i refresh these pages again they load very quickly and are quick on other computers. However after a few hours if i revisit the same pages again they are slow for the first load and then are fast again.

    I do not believe this is anything to do with browser side caching as why would a page be slow for me on one pc then fast on another after ive visted it.

    Please try this test:
    Visit a page on the site (Usually a product category), and eventually you will find one that takes a few seconds to load in. Then once you find that slow page reload it again and it will be fast.

    Then visit the same page in incognito mode and it will be as fast as the 2nd visit was initially. Wait a few hours and retry the page and it will be very slow again.

    We are VERY confused as to what is going on here as its obvious that at times we are being severed a html file from cache and others its recreating a new cache by hitting the server directly.

    I can ake screenshots of all the admin areas of the plugin, plus we are a pro member as well if that helps.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @adambushell

    If I understand this correctly, you are talking about your personal experience when browsing the website?
    I’ve reproduced the steps you advised and in my experience, your website loads very fast and the browsing experience is great.
    I am not seeing any hiccups with loading the page and any excessive time needed for any page to load.
    For example, this is the initial visit of the page https://www.terzettostone.co.uk/journal/

    and this is the reload of the same page:

    As you can see the difference for ttfb is 0.32ms which is 3.2% of a second
    What you can do is to check if the cache is being purged. Since you are a Pro user you can use the Purge log and see what may be purging the cache. IF the cache is purged frequently, and the _old files are created often, you can see in the purge log what may be triggering the purge.
    I hope this helps!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Page Cache files self deleting?’ is closed to new replies.