LiteSpeed Cache Not Ignoring the Query String Despite Configuration

#1
Hello dear members,

I'm having trouble with LiteSpeed Cache on my WordPress site regarding the "lmid" query string.

Despite configuring LiteSpeed to drop the "lmid" query string in the cache settings, changing its value still results in a cache miss, as shown by the "X-LiteSpeed-Cache: miss" in Chrome Developer Tools.

Steps taken:
  1. Added "lmid" to the drop query string field in LiteSpeed Cache settings.
  2. Noticed cache misses upon varying the "lmid" value in URLs.
My goal is for LiteSpeed to cache a page even when the "lmid" parameter changes.

Any advice on ensuring LiteSpeed ignores this parameter, or explanations for this behavior, would be greatly appreciated.

Thank you for your help!
 

Attachments

serpent_driver

Well-Known Member
#2
Check the root .htaccess if there is a lmid entry

Code:
### marker DROPQS start ###
CacheKeyModify -qs:lmid
....
### marker DROPQS end ###
If there is such entry you may misunderstand this function.
 
#3
Check the root .htaccess if there is a lmid entry

Code:
### marker DROPQS start ###
CacheKeyModify -qs:lmid
....
### marker DROPQS end ###
If there is such entry you may misunderstand this function.
Yes, there is such an entry in the .htaccess file as shown in the screenshot below.

Yeah, maybe I have misunderstood this. Could you kindly clarify its functionality? And how can I achieve my end goal?
 

Attachments

serpent_driver

Well-Known Member
#4
Yeah, maybe I have misunderstood this. Could you kindly clarify its functionality? And how can I achieve my end goal?

LScache is a page cache. That means that a copy of each URL/HTML output is created for the cache. If a URL has a GET parameter like https://example.com/index.php?lmid=whatever then this is a different URL as without GET parameter and a seperate cache copy is created. If you set a cache key for the Drop Query String function that means that a URL with and without GET parameter uses the same cache copy. It doesn't mean that a URL with GET parameter is excluded from caching.
 
#5
If you set a cache key for the Drop Query String function that means that a URL with and without GET parameter uses the same cache copy. It doesn't mean that a URL with GET parameter is excluded from caching.
Thank you very much!! I got the idea! :)

By the way, is there any other way I can achieve what I am trying to do? Forcing LSCache to use the same copy regardless of that "lsid" parameter?
 
Top