• Resolved winedr

    (@winedr)


    I have been using LSCache on a Litespeed server for a few years, its a great product, thanks.

    I have a WordPress site which controls access to paywalled content vis a third-party app. When users log in through the third-party app the app places three cookies on their computer.

    I used to run private and public caches but recently changes to caching using one of these cookies as a vary cookie. It works well except for one problem which is specific to Safari on iPhone: when a user successfully logs in to the third party app, the LSCache browser continues to return the stale page with the log-in box, instead of displaying the accessed content. All the other pages now display correctly though, showing that the vary cookie is working. Just the page used to log in is stale. If I then purge the page from the cache, it displays correctly on the browser, even if the user now logs in and out multiple times, the browser displays the two cached versions as it should.

    I have tried changing browser caching to no effect. I would appreciate any suggested next steps for investigation/solution. Thanks.

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

    (@qtwrk)

    please provide the report number

    you can get it in toolbox -> report -> click “send to LiteSpeed”

    Thread Starter winedr

    (@winedr)

    Thank you.

    Report number: BETHVFBQ

    Plugin Support qtwrk

    (@qtwrk)

    	SetEnvIf Request_URI "shtml$" change_header
    Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0" env=change_header

    please try add this to your .htaccess

    Thread Starter winedr

    (@winedr)

    Thank you so much, I will try that and test it.

    Thread Starter winedr

    (@winedr)

    Many thanks, this is working for me. Great job!

    Thread Starter winedr

    (@winedr)

    Sorry to post this update so soon, but although this seemed to work for 2 weeks, this morning it is doing the same thing. If I test the log-in on a page, the server keeps returning the page with the log-in box again, rather than the content behind the log-in box. Other pages serve the accessed content though, it is just the page used to log-in which is stale.

    I have the code as above in the .htaccess file. I tried it inside a mod_rewrite.c tag and outside – not sure if that is important, sorry, or if it should be placed elsewhere. Any suggestion as to why it should appear to work intermittently, or if there is another solution/modification I could try?

    Many thanks, Chris

    Plugin Support qtwrk

    (@qtwrk)

    please create a ticket by mail to support at litespeedtech.com with reference link to this topic, we will investigate further.

    Thread Starter winedr

    (@winedr)

    Many thanks, have done so.

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

The topic ‘Cache using vary cookie returns stale content’ is closed to new replies.