• Resolved omertapl

    (@omertapl)


    Hi! I have a problem, because cache on my website only work when I refresh it. I mean when I first visit my website there is no cache version, it only appears after I refresh the page. What options do I need to change to make the cached version work as soon as I first access the site?

    Number of my report: CWDHYDAZ

    • This topic was modified 1 year, 11 months ago by omertapl.
Viewing 15 replies - 1 through 15 (of 31 total)
  • Use the built-in cache crawler that is especially made for warming up the cache.

    Thread Starter omertapl

    (@omertapl)

    Yeah, I know that this is the feature for it. But this cache crawler doesn’t work properly. Can you check my crawler settings? Because when I run this option there all of my sites (from sitemap) are missing (not cached).

    Cache crawler works, but if pages are not cached check your cache and exclude settings. The best is you choose one of the new presets, but start from Essentials preset and select others one by one after you have checked that everything is still okay at the frontend.

    And FYI: Cache for logged-in users can’t be warmuped.

    Thread Starter omertapl

    (@omertapl)

    I already have settings that work without any problems on the front end. The problem occurs when crawling is enabled. I have 1066 tabs on the site (products, entries, pages) and when I turn on the crawler, the console (the one that is in the settings) shows that it is scanning the subsites, but when I refresh the page after a few minutes, when they go to the “map” option none of the subsites are cached properly.

    Plugin Support qtwrk

    (@qtwrk)

    please try a robust case

    set crawler interval to 61 seconds , and make sure wp-cron is properly triggered

    then run crawler, see how it goes

    Thread Starter omertapl

    (@omertapl)

    Unfortunelly this method doesn’t work. When I go to “map” tab in “crawler” options there is a list of pages from sitemap and half of it has a “200 status” and blue color that means “cache miss”.

    Plugin Support qtwrk

    (@qtwrk)

    please screenshot me your crawler summary page

    Thread Starter omertapl

    (@omertapl)

    Here you go:

    View post on imgur.com

    In this screen “blue” only gives the status of successfully crawled URLs and nothing else, but I think I know why you think caching fails with crawler….

    Thread Starter omertapl

    (@omertapl)

    Ok, but why when I first visit page with ?blue status” in the ?network” at developer tools there is status “cache: miss”? Status change only when I refresh this page again. I want to serve cached version of my website everytime (from the first visit of website). And I feel that there is no cached version when I visit page for the first time because page load about 5-6 seconds.

    The basic principle of every cache is that what is to be cached must be used at least once. In relation to the cache plugin, this means that a URL must be requested at least once for the URL to be cached. This also means that every URL initially has a “miss” header, regardless of whether a URL is requested by the crawler or by a normal user request. When the crawler requests a URL, the crawler asks the server: “Hey, what is your cache status?” And the server answers: “It’s missing, but I am just caching it!” This means that the cache status is only changed “after” the request. If a URL cannot be cached, e.g. because a URL was excluded from caching, the server returns the cache status: no-cache.

    Thread Starter omertapl

    (@omertapl)

    But this misses the point of using a crawler. That’s why I want to scan the entire page with the crawler, so that I can serve the user a quick version that is cached the first time. So there is no option which would allow to serve the user a cached version of the page on the first visit?

    But this misses the point of using a crawler.

    No! Why? The crawler warmup the cache by requesting all URLs, so if a user requests the URL it is already cached by the crawler.

    So there is no option which would allow to serve the user a cached version of the page on the first visit?

    Of course there is an option and this options’s name is the crawler. He does what you want to get. But if you don’t use the crawler the cache isn’t warmuped and the first request of an uncached URL is miss.

    This is a law of nature that cannot be changed. What you want is wash me, but please don’t get me wet…. So use the crawler and get the best you can get.

    Thread Starter omertapl

    (@omertapl)

    Ok, in that case we misunderstood. And in this case, my crawler is not working well because I enter addresses that are supposedly cached by the crawler and it still shows me the non-cached version the first time. Only when I refresh the URL does the cached version appear to me. And here is the point of my problem, why is this happening and what else do I need to change in the settings to make the crawler work properly?

    There are cases where caching problems can occur. But before I explain that in more detail, I would like to know whether you are logged in when checking the cache manually?

Viewing 15 replies - 1 through 15 (of 31 total)
  • The topic ‘Hit cache in first visit’ is closed to new replies.