• Resolved danushkaj91

    (@danushkaj91)


    LiteSpeed Report number: WJXQHCAO

    Hi guys,

    Please watch the video below.
    https://drive.google.com/file/d/1yZT_n6RdGk_K93jOP4J0g0LAtIhgg3xc/view?usp=sharing

    ? Left screen – Not logged in
    ? Right screen – Logged in as a ‘customer’ (not admin)

    This is the issue. The cache pages created in the server will not be served to logged in users. (customers get cached pages on their 2nd visit to the page. )

    So whenever someone checks the website without logging in, everything is ok. But when they check after logging in, pages are slow (because not served cached pages in the 1st visit to a page)

    Thanks

Viewing 14 replies - 1 through 14 (of 14 total)
  • Hi @danushkaj91 ,

    In LiteSpeed Cache -> Settings -> [2] Cache, you have to ensure that “Cache Logged-in Users” is set to “ON”, like this:

    https://snaps.hcdn.dk/2ybK8aABSnKEJ1EcS091k8GtRK3P1tAoexFZmtsW5FeEHzjCsl.png

    Thread Starter danushkaj91

    (@danushkaj91)

    @lucasrolff Thank you.

    But isn’t that going to cache the pages per user?

    What I need is logged in customers to see server-cached pages. (same as visitors who are not logged in) – So, as far as cache is concerned, logged in customers are considered as same level as visitors who are not logged in.

    Regards

    • This reply was modified 5 years, 3 months ago by danushkaj91.

    Hi @danushkaj91, have you tried set “Cache Logged-in Users” to [OFF]? I saw your report is setting [ON] in this setting.

    Thread Starter danushkaj91

    (@danushkaj91)

    Hi @stanleylitespeed I actually tried both ‘on & off’ and didn’t seem to fix the issue.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    I think the best solution for that is pre-crawl the page to cache it.

    If you want to login user views same pages as guest user , I am not sure if it can be easily done, you can try use “force cache” options with “/” URI

    Best regards,

    Thread Starter danushkaj91

    (@danushkaj91)

    Hi @qtwrk

    Thanks for the input.

    Pre-crawl -> I’m already pre-crawling the pages via CURL.

    “force cache” -> Can you please explain this a bit more? or a link regarding this?

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    No , if you use curl to crawl it , it crawls public page , not as logged in user

    Please check this wiki

    Best regards,

    Thread Starter danushkaj91

    (@danushkaj91)

    Hi @qtwrk, Thanks again for the reply.

    Is there a way to crawl as a customer? (but we have over 500 customers, so we cannot crawl per each customer, it has to work for the whole user-group).

    Or is there a way to serve customers public cache?

    I’ve checked the link you gave, but it opens this page. (LiteSpeed Cache for WordPress: Report)

    Regards

    Hi!

    I think you can work with litespeed crawler.

    On crawler settings tab, go to “role simulation” and simply put any ID of one of your customers.

    You can go to users, hover mouse on the link of any customer and see in the url the “ID” number.

    After that got to litespeed – crawler (separate option, not under settings), and here be sure to enable cron crawler.

    Now you will see two queues, one cache for visitors, and other cache for the same user role of the ID (your “customers”).

    Should work.

    Actually I am doing something similar, now testing times trying to maintain the cache enabled and updated 24h, because in my case seems we lost cache very fast.

    Regards.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    @danushkaj91 more info can be found in this wiki

    @danushkaj91 thanks for the reply , this wiki might also be helpful for your case.

    Best regards,

    Thread Starter danushkaj91

    (@danushkaj91)

    Hi @qtwrk & @rafasshop ,

    Thanks guys. You are right. I used the role simulation thing and it works great. Just had to lower cpu limit and no. of threads in crawl settings to make sure it won’t overload the server and now it’s working great.

    Thank you

    PS. In case someone really wants to do it via CURL (maybe your server provider won’t enable crawl)……
    You will need to get the cookies by login with user account and copy those cookies into the curl command and then try to replicate the curl request headers as closely as possible.

    Hi!

    Your welcome @danushkaj91 . Happy to read you solve your issue.

    Thank @qtwrk to point me about possible reasons.

    Woocommerce products are considered as “pages” too? For the moment I disabled all the fields to see if can be related.

    Thank you.
    Regards.

    Thread Starter danushkaj91

    (@danushkaj91)

    Hi @rafasshop

    Product pages are basically posts with the post_type being ‘product’.

    In your case, if your cache disappears fast, maybe you can try to increase the cache ‘max-age’ ?

    Hi @danushkaj91

    On my .htaccess I only have these two references to max-age:

    ### marker CACHE RESOURCE start ###
    RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600]
    ### marker CACHE RESOURCE end ###
    
    ### marker FAVICON start ###
    RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400]
    ### marker FAVICON end ###

    So each 1 hour I lost all caches?

    My objective is to have all pages cached 100% of time, refreshing cache each 4 hours.

    I setup crawler to crawl full website 1 time per hour, and I noticed that sometimes when run, products and categories still cached due scan around 700 urls in only 4 minutes, I think is very fast in case cache don’t exist.

    I am not sure if is silly suggestion, but maybe good feature is to have a checkbox on crawler settings to “clear url cache before crawl to get refresh content”. So in case the cache is not expired, can generate new cache version.

    @danushkaj91 I am not sure if you have many user roles to cache, but I am commenting things on this post, only in case is for your interest too:

    https://www.ads-software.com/support/topic/vary-groups-dont-allow-assign-same-number-in-two-or-more/

    thanks!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Logged in ‘customers’ get x-litespeed-cache: miss’ is closed to new replies.