• Resolved raymond621

    (@raymond621)


    Hi Support

    I am trying to drop query string to limit the number of cache copies. Enable cookie simulation to serve cache copies base on value of cookies.

    So this query string is dropped > ?wmc-currency

    Under cookie simulation, I added this cookie wmc_current_currency with values: _null, AUD, CAD, NZD etc…

    when I visit a page https://www.abc.com/productA/?wmc-currency=AUD, a cookie is fired but why isn’t the currency showing as AUD, it reverting back to the default USD currency.

    I had an impression that the cookie simulation can be used for this purpose.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support litetim

    (@litetim)

    The issue is related to crawler by cookies, yes? https://docs.litespeedtech.com/lscache/lscwp/crawler/#cookie-simulation

    Plugin Support qtwrk

    (@qtwrk)

    I don’t think you can do thing this way.

    when you set a drop query string, then it will no longer be treated as separated URI

    for example by default

    /something/
    /something/?currency=XXX
    /something/?currency=YYY
    /something/?currency=ZZZ

    this is 4 caches

    when you drop it , these 4 URIs will hit same cache , instead of 4

    and in the cache /something/ is cached already , then ?currency= will be dropped , won’t trigger PHP anymore , so it displays /something/ content , in your case, the default USD currency

    Thread Starter raymond621

    (@raymond621)

    ok, i just removed the cookie simulation. Under cache>advance, I have also left it blank under login cookie and cache vary. When I visit my htacess file, it says the following:

    marker LOGIN COOKIE start

    RewriteRule .? – [E=”Cache-Vary:,wp-postpass_2cdc91481948393ac7cf30292d6e21d2,wmc_current_currency,wmc_current_currency_old,wmc_ip_info”] marker LOGIN COOKIE end

    I try to edit the htacess file by deleting “RewriteRule .? – [E=”Cache-Vary:,wp-postpass_2cdc91481948393ac7cf30292d6e21d2,wmc_current_currency,wmc_current_currency_old,wmc_ip_info”] ” but it seems on coming back up. Not sure what this is for.

    Thread Starter raymond621

    (@raymond621)

    I will also like to add that under database wp_options, there is this litespeed.conf.cache-login_cookie with no option_value and autoload is set to yes.

    Plugin Support qtwrk

    (@qtwrk)

    manually remove won’t work , it will add back by whoever adds it in the first place, you may need to figure out what add it first , otherwise each time you click “save” button in plugin , it will regenerate

    if not showing in database, that means some plugin called our API for cookie vary

    Thread Starter raymond621

    (@raymond621)

    I am reading this article regarding on cache vary settings from cache>advance

    https://gitlab.litespeedtech.com/preview/lscache/vary/index.html#:~:text=VARY%20%3D%20VARY_COOKIE%20%2B%20VARY_VALUE-,Vary%20Cookie,vary%20on%20the%20cookie%20my_cookie%20.

    “The Cache Vary is an important concept for caching. For simplicity’s sake, the idea behind cache varies is that they allow the cache to save multiple versions of the same URL.”

    Under the field vary cookies, do I enter this:

    VARY = "wmc_current_currrency=USD"

    Or

    wmc_current_currency

    Plugin Support qtwrk

    (@qtwrk)

    I’d suggest just put

    RewriteRule .? - [E=Cache-Vary:my_cookie]

    at top of your .htaccess , the field you mentioned was meant for login-vary

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.