• Resolved cyrix2000

    (@cyrix2000)


    Hi,

    I’m using Litespeed Cache and the Aelia Currency Switcher plugin. The plugin generates two cookies (“aelia_cs_selected_currency” and “aelia_customer_country“) which I want to use the to generate cache variations.

    If the customer is a first time visitor to the website, the dynamic caching should be disabled and the page content freshly dynamically generated. Then when the cookies are set, the correct cache version for the cookie combination should be delivered.

    I know that

    RewriteRule .* - [E=Cache-Vary:aelia_cs_selected_currency]

    will generate a cache variation for one cookie

    My questions are:

    • How do I define a Litespeed rewrite rule for a combination out of two (or more) cookies.
    • How do I tell Litespeed to only perform static (but no dynamic) caching if the cookies aren’t available?
    • This topic was modified 2 years ago by cyrix2000.
    • This topic was modified 2 years ago by cyrix2000.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support qtwrk

    (@qtwrk)

    you can keep adding more rewrite rule for different cookie

    I am not exactly sure what do you mean by “static cache” in this context

    LSCWP only cache dynamic request, it doesn’t care the static requests.

    Thread Starter cyrix2000

    (@cyrix2000)

    Hi,

    Ok iin that case I meant “no caching” if the two cookies aren’t present (I’m also using quic.cloud CDN and still wondering how litespeed cache and quic.cloud play together regarding dynamic/static caching).

    What I want to achieve is that website visitors with cookies present are getting dynamic and static assets cached, whilst first time visitors only getting static assets cached but dynamic assets freshly generated by the server.

    Plugin Support qtwrk

    (@qtwrk)

    it should serve cache even no cookie

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

    Thread Starter cyrix2000

    (@cyrix2000)

    Hi,

    Yes I know it is serving cache without cookies. I would like to know if there is a setting to stop it serving cache without these cookies present, as the cached pages will show wrong prices, if the cookies aren’t there to give away the country (and so the pricing) for the visiting customer.

    Plugin Support qtwrk

    (@qtwrk)

    there is a GeoIP module and support for cache : https://docs.litespeedtech.com/lsws/cp/cpanel/geoip/

    but this will need a server root access to install it

    this will use geoip database to provide country as server variable , and cache engine can use that directly to determine country/currency

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘No dynamic caching for first time visitor’ is closed to new replies.