• Resolved walstice

    (@walstice)


    Hello,

    I am new to LiteSpeed, the configuration went perfect, everything (almost) works fantastic. We do have a WooCommerce B2B (members only) website. All pages are public but to see prices, add to cart etc.. you need to login first.

    I am facing two issues:

    Issue 1) After customers do login, cached pages are still served to them. They can’t see prices and add products to the cart as they still see the website as non-logged in users.

    Issue 2) As members-only WooCommerce website, we do not want to purge at all any cache of categories/products when stock status or quantity changes, but unfortunately there’s no such option. Every time we get an order, categories/products are getting purged.

    For reference, this are the only options: https://i.ibb.co/0Kp73RH/2343.png

    Any help would be appreciated, thank you in advance!
    Walter.

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    please provide the report number , you can get it in toolbox -> report -> click “send to LiteSpeed”

    Best regards,

    Thread Starter walstice

    (@walstice)

    Hi, thank you for your reply!

    The report number is: ZNLPAZRC

    Thanks.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    I applied an account, please prove me , it has email address ends up in @litespeedtech.com

    need to check few things around as login user first.

    Best regards,

    Thread Starter walstice

    (@walstice)

    Hi, I just approved your account.

    Please tell me when you plan to test it yourself so I will enable again the cache. You can even just reply to this topic, I will get immediate notification.

    By the way, I had to disable the cache since customers couldn’t use the website.

    Thanks again for your support!

    Thread Starter walstice

    (@walstice)

    Hi, at the end I manage to fix my issue number 1 (cached logged out pages being served by mistake to logged in users).

    I have just this issue left:

    As members-only WooCommerce website, we don’t want to purge at all any cache of categories/products when stock status or quantity changes, but unfortunately there’s no such option. Every time we get an order, categories/products are getting purged and logged out users do not get benefit of the cached pages.

    For reference, this are the only options: https://i.ibb.co/0Kp73RH/2343.png

    Is there any solution to this?

    Thank you.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    I think it doesn’t really matter, the private cache for login user should only last for 30 minutes and they are individual to each login user

    so even it didn’t get purged upon checkout/product stock change , it will still automatically expired in 30 minutes

    Best regards,

    Thread Starter walstice

    (@walstice)

    Hi, thanks for your reply.

    At the end, the issue about cached pages served to logged in users still occurs.

    Basically, when I am logged out and I login the members-only website and browse product categories, I still see logged-out cached pages, therefore I can’t see prices and add to cart.

    How can I resolve this issue?

    Best Regards
    Thanks

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    on my test account , I can see once I logged in , it gives x-litespeed-cache-control: no-cache header, which means page is not being cached

    what is the HTTP response header you see in your case ?

    Best regards,

    Thread Starter walstice

    (@walstice)

    Hi, on a fresh browser tab, visit the homepage, then a category, and the a product.

    Now login into the website, and repeat the process (homepage > category > product). You will notice that pages are still cached even after login, which results in user impossibility to see prices and add items to cart.

    Please let me know, best regards.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    you have cache-control: public, max-age=31536000

    this will make browser to cache the page so it won’t fetch from server again , please make it back to WP default value cache-control: no-cache,max-age=0,must-revalidate first

    Best regards,

    Thread Starter walstice

    (@walstice)

    Hello,

    after following your kind advice, I notice that now Product Categories are not served from browser cache after login, but product page il still browser cached.

    Now if I:

    Go to Homepage > Category 1 > Sub-Category 2 > Product Page X

    And then I go back to Category 1, and I login via the sidebar widget, and I go back into Sub-Category 2 I (finally) don’t see anymore the browser-cached page.

    But when I go to Product Page X then it shows me the browser-cached page, therefore I can’t see prices and add to cart.

    This is the header showing on product page: https://i.ibb.co/HdY70xg/234.png

    Any clue what it could be?

    Thanks!

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    please try add this at top of your htaccess

    RewriteRule .* - [E=Cache-Vary:wordpress_logged_in_3ff6014ebd79c8330647227e8236f1eb

    save and purge all

    Best regards,

    Thread Starter walstice

    (@walstice)

    Hi,

    unfortunately none of your solutions worked (cache-control and rewrite rule).

    Cached pages are still served to logged in customers and I cannot figure out what is it! I tried disabling LiteSpeed and the problem is gone, so it’s LS for sure.

    It’s really killing me since our customers are facing lots of problems since we started with LS cache.

    How to replicate my issue: Visit PAGE X, then visit PAGE Y and login. When you go back to PAGE X you will see it as non logged in (no prices, no add to cart button).

    Any other resolution to this?

    Thanks!

    Plugin Support qtwrk

    (@qtwrk)

    yikes , sorry the rule missed closing ] , so it doesn’t effect at all

    `RewriteRule .* – [E=Cache-Vary:wordpress_logged_in_3ff6014ebd79c8330647227e8236f1eb]

    if this doesn’t work , please create a ticket by mail to support at litespeedtech.com

    we will investigate further

    Thread Starter walstice

    (@walstice)

    Hi, yes I already saw your typo mistake, I set it correctly into my htaccess but still nothing.

    I will open a ticket then, thanks anyway.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Cached page are served to logged-in users’ is closed to new replies.