• Resolved C Green

    (@cgreen177)


    Hi I am new to litespeed and trying to configure it but hitting some issues when testing the caching before I put a new site live.

    1. I use Screaming frog to generate the cache manually after purge
    2. I check the filesystem to verify the cache exists
    3. I open a new incognito browser and load the page. I see the litespeed cache as MISS yet the combined and minifed css and js are being loaded
    4. I refresh the page and get a litespeed cache hit with the same files being loaded.

    I am a bit at a loss

    Edit: not sure if it is relevant or not but I did also have a cache variation for cookie consent. Although as I have to add this in the htaccess file it seems to get overwritten whenever I change any settings …. Is that right?

    Litespeed Report: VXKNTMME

    • This topic was modified 1 year, 11 months ago by C Green.
    • This topic was modified 1 year, 11 months ago by C Green.

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter C Green

    (@cgreen177)

    Edit: realised I had ‘delayed’ javascript in an attempt to solve another problem, so have switched this off, but still seeing the same issue on first load.

    New Litespeed Report: MCFRFUZT

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    1/2) if you are using 3rd party crawler service , make sure you have simulate the cookie (since you seem to have a cookie vary rule ?) , proper user-agent , and also the encoding , any of them missed will lead to cache miss

    3) its always there regardless miss/hit

    best regards,

    Thread Starter C Green

    (@cgreen177)

    Thanks

    OK let’s simplify things and remove the cache vary.

    Step 1: purge cache
    Step 2: crawl site via Screaming Frog to populate cache https://imgur.com/NksKt0j
    Step 3: load home page

    Observations:

    Home page generates a cache miss https://imgur.com/GepiJKV
    JS request is for the file that is in the cache https://imgur.com/y8XVqv7
    Next request HITS the litespeed cache and requests the same file, with the same versions – you can try it yourself.

    My client may be looking at the site but I don’t think will go anywhere near the privacy page so you should see the behaviour for yourself there.

    So, why when I have a pre-populated cache (valid for a week), does the first page hit always generate a miss?

    What have I done wrong in the setup, because this can’t be right, so I assume it is my error somewhere. Is it the encoding? Does the litespeed crawler take care of that? In which case, are we syaing it’s stupid to even to try to use Litespeed if the host won’t allow access to the crawler?

    (I have 2 hosting companies – one does allow the crawler, the other one demands you go onto private servers before it allows this)

    For completeness please also see report: BGKFNJMY

    Thanks

    • This reply was modified 1 year, 11 months ago by C Green.
    Thread Starter C Green

    (@cgreen177)

    * And if was to do with Screaming Frog using the WRONG encoding, wouldn’t I then expect to see a new cache file generated on first page load (which I don’t)

    Plugin Support qtwrk

    (@qtwrk)

    as you have enabled guest mode , you will also need to simulate the guest mode cookie , otherwise you warms the guest page’s cache , instead of normal page’s cache

    any reason why you don’t use the plugin’s built-in crawler ?

    for these js files , not exactly as you expected

    let’s say I have 2 requests , one comes with encoding , one doesn’t , but they will both serve same js/css files , because the page content is still same, but encoding is different , so even cache miss, it won’t generate new js files

    Thread Starter C Green

    (@cgreen177)

    Aha! OK I have this working now that guest mode is off thank you and Screaming Frog does now populate the cache correctly (I knew it would be a noob error).

    Next hurdle – how to handle GDPR Cookie compliance cookies without a cache vary …

    I can’t use the crawler because the host won’t let me ??

    Thread Starter C Green

    (@cgreen177)

    marking resolved

    Thread Starter C Green

    (@cgreen177)

    Sorry rather than raise a new ticket I’m reopening. I’m still seeing issues. Here is what I have observed today:

    1. Tested some pages but 404s were being returned for the css and js files. I suspect that might have been something to do with my purge settings (which were all unchecked, so I changed that)

    2. Flushed cache and waited for a cron job to run to ‘wget’ each page to populate the cache (c 9:17 am)

    3. Observed cache population successfully and litespeed cache being hit.

    4. At around 1:30 pm tried to access the site from a different device and suspect the cache wasn’t hit first time. Difficult to tell as I was mobile with a poor signal

    5. 16:00 accessed site again from private browser and I can see a litespeed cache miss again on first page hit (check privacy page to see this).
    6. Waited until after 16:20 (after cron job below) to try again and can still see cache miss on first page view.

    I have a cron job which runs the following command for each page once an hour at 17 minutes past the hour:
    wget -O – <url> >/dev/null 2>&1

    But even though I can confirm this is running it doesn’t seem to keep the cache warm. My cache expiry is set to 1 week so should I be seeing this?

    Again apologies it’s probably something in my settings (the cookie is not being varied and instead I am excluding the relevant css and js from the cache, which seems to work fine)

    Report reference: QEKXPMKR

    • This reply was modified 1 year, 11 months ago by C Green.
    Thread Starter C Green

    (@cgreen177)

    Also now seeing 404s on the js and css when I get a HIT on page load as the cache files seem to have disappeared and are not getting repopulated by my cron job. Is this because I don’t have access to the litespeed crawler? And why would the cache files disappear in under 24 hours when the TTL is 1 week?

    Any help appreciated but I am rapidly coming to the conclusion that I cannot use Litespeed for my caching solution here

    Plugin Support usabe

    (@usabe)

    Hi @cgreen177

    Due to inactivity of this topic, I will mark this topic as “resolved”. If you still have such issues, please feel free to open a ticket with further information by emailing to [email protected]. Remember to reference this topic and ask to assign your ticket to Abe. I will check into this further from there.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Litespeed Cache Miss on first page load despite cache being populated’ is closed to new replies.