• Resolved francoc30

    (@francoc30)


    Hi Marko,
    I have a couple of questions on Cache Preload:
    1) I use the WordPress generated sitemap in the Sitemap URL field. The sitemap/url is dynamically generated by WordPress core, so are many SEO plugins. I have not put the url on a page. Will this works, or the sitemap has to be on a page for the Cache Preload to work?

    2) After I enter the sitemap url in the field, do I need to enable the feature? I don’t see such checkbox.

    3) If I check-mark the checkbox “Automatically prime the page cache”, the default values would apply, i.e. purge page cache every 900 secs in batches of 10 pages. Do I understand it correctly? If so, if I have 200 pages, how does Cache Preload works? Does it wait for all 200 pages being purged first before doing another round of preloading? It will take 5 hours just to purge all 200 pages with the default setting values.

    4) Is cache preloading a scheduled event on a fix timetable, or a continuous process throughout the day? If I want to schedule the start of cache preload at midnight, how can I do that?

    5) If I DO NOT check-mark the check box Automatically prime the page cache, what will happen with preloading? Will it still work? If yes, with what parameter values?

    Sorry for all the questions. I just want to understand this feature a little more. Thanks.

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

    (@vmarko)

    Hello @francoc30

    Thank you for your questions and I am happy to answer.
    1. You need to add the sitemap to Performance>Page Cache>Cache Preload>Sitemap URL: filed. Only then W3 Total Cache will know which sitemap to crawl.

    2. You need to enable the Automatically prime the page cache checkbox for the Cache PReload to be enabled. Priming Cache – Cache preload = same

    3. When the feature is enabled, it does not purge the cache every 900s (if default). With default settings, 10 pages of the website will be preloaded every 15 mins, and another 10 after the next 15 mins, and so on. With default settings, the entire website will be preloaded in 5 hours. Once again, the cache is not purged, instead, the pages are cached automatically with cache preload.

    4. This is a continuous process. Once the preload is finished, meaning all 200 pages are cached, the preload will start from the beginning as long as the option “Automatically prime the page cache” is enabled. This way your entire website will always be served with “warm” cache.

    5. If you don’t enable the check box to Automatically prime the page cache, the Cache Preload will not start or work.

    I hope this helps!

    Thanks!

    Thread Starter francoc30

    (@francoc30)

    Thanks Marko for the explanation. It is much clearer now. My first question from above is Do I need to put the sitemap url on a page and also in the Performance>Page Cache>Cache Preload>Sitemap URL: field? Currently when I type https:\\mysite.com\wp-sitemap.xml in the browser, my sitemap is displayed in the browser window. I have not added this link on any page, just in the Cache Preload>Sitemap URL: field. I just make sure this is how it is done correctly.

    Also, is there anyway to check if the preload is working, like a log file or something?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @francoc30

    You only need to add the sitemap to Performance>Page Cache>Cache Preload>Sitemap URL:
    YOu can check the cache folder in wp-content and see the pages generated. Also, you can use WP-CLI:
    wp w3-total-cache pgcache_prime [--start=<start>] [--limit=<limit>] and track the output which pages / sitemap positions are primed by script.
    Thanks!

    Thread Starter francoc30

    (@francoc30)

    Ok, I don’t need to put the sitemap on a page in addition to the sitemap url field in Page Cache.
    I check the wp-content/cache folder. There are a lot of subfolders. Which subfolder I should look at. By the folder’s updated date, I guess it should be /cache/page_enhanced. Please advise.
    As for the use of WP-CLI:
    wp w3-total-cache pgcache_prime [–start=<start>] [–limit=<limit>]
    Can you provide me with more instructions as how to do it. I am not a web developer but am comfortable to follow directions.

    Now that Cache Preload is enabled and html_gzip files are being served to visitors, is there any needs to enable minification in W3TC?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @francoc30

    Yes, the files should be cached in /wp-content/cache/page_enhanced/yourwebsite.com
    There should be a folder for each page.
    You can check more about WP-CLI on this link, however, if the files are created in /wp-content/cache/page_enhanced/yourwebsite.com you do not need to use WP-CLI.
    With Minify you can increase the performance of the website even more by minifying the JS, CSS, and HTML files. Once the files are Minified and Gzipped also, you can save up to 86%.
    Thanks!

    Thread Starter francoc30

    (@francoc30)

    Hi Marko,
    I did see each page is represented in /wp-content/cache/page_enhanced/yourwebsite.com. In some folders there are two index files _index_ssl.html and _index_ssl.html_gzip. And in others they contain _index_ssl.html_old and _index_ssl.html_gzip_old. Are these what expected? Can you explain them please? Does the ones suffixed with _old mean they are not cached/preloaded cached at all? If so how can I correct them?

    I did some page loading test using a stopwatch. When I first visit a page the time to load it is around 7 seconds. Then I reviste the same page, the load time is under 2 seconds. With Cache Preload enabled, I expect the first-visit-page load time to be close to the re-visit scenario of under 2 seconds. I may be missing something. Can you explain my observation and give me information so I can speed things up?

    At this point I have not enabled Minify in the General Settings. I may do that after I figure out the questions on Cache Preload features, with your patient help. If I do, I don’t need to do anything else and just use the default minification settings. Will that works?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @francoc30

    If you are seeing all the pages it means that preload is working.
    The _old files are created when the cache is purged, and once the Preload gets to that page and caches it, new files will be created and the old files will be removed with Garbage collection interval.
    You need to take into consideration other factors. When the page is cached, it’s stored in the cache folder and served much faster to the visitors. How long it takes for the page to be loaded, also depends on the server location and from where you are trying to visit the page, and also, of course, server resources. Once the page is visited, it’s also cached in the browser so naturally, the second load is much faster.
    Also, you mentioned _old files, and this means that if you are visiting the page that is not cached, the browser is fetching the original page, and not from the cache. Also, other resources may be loading on your website like any ajax calls, external resources from other servers etc.

    As for Minify, this depends on your website. You should try the default Minify and see how the website behaves.

    Thanks!

    Thread Starter francoc30

    (@francoc30)

    Thanks for the explanation and your patience. Much appreciated.

    If I were to use a SEO plugin that generates a sitemap with another xml file name/url, can I simply replace the old sitemap url with the new one in the Performance>Page Cache>Cache Preload>Sitemap URL: field? Or I have to do something extra, like deleting the existing /cache/page_enhanced folder?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @francoc30

    The sitemap should show the same content I.E. all URLs on your website.
    Just to be safe, once the URL is replaced, delete the /cache/page_enhanced folder so that new cached pages can be created.
    Thanks!

    Thread Starter francoc30

    (@francoc30)

    Thanks Marko. Your support is timely and top notch. Much appreciated.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @francoc30

    You are most welcome!

    We would really appreciate it if you could take a minute and post a review here. This will help us to continue offering a top-notch product to users.
    Thanks!

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

The topic ‘Cache Preload questions’ is closed to new replies.