Wordpress LScache Plugin: How to prevent cache for product filters result?
Hi, I got problems on LiteSpeed Cache. I have a product filter that allow customers to sort and filter taxonomy to found suitable auto parts for their vehicles. I found the filter criteria will be cache to all customers. e.g. A customer search for Year 2020> Audi > TT, another customer even didnt input any search, they will got cache of same filter criteria. I have tried to disabled options one by one and added except cache URI and exclude JS until only can be fixed by turn off Enable Cache completely. https://drive.google.com/file/d/15iU4iDW1jvFAlSiXChwE9pDDfzbluA6h/view?usp=sharing Please help. Million thanks Million thanks Id prefer $1 million. I dont know how your filter works, but most filters generate $_GET parameters in URL. These parameters you can use to exclude URLs that contains these parameters from being cached. https://docs.litespeedtech.com/lscache/lscwp/cache/#do-not-cache-query-strings Yes, I have even tried excludeds URLs but still cannot make it works. the URL like: ?year_id=35394&make=48558&series=49048&category=149&action=vpf-ymm-search I have input one per line year_id make series vpf-ymm-search If you would provide us with a link to your page would help to identify the correct parameters. https://sgt-store.com/ https://sgt-store.com/?year_id=35394&make=52598&series=52599&post_type=product&action=vpf-ymm-search https://sgt-store.com/category/performance/ Thanks Ive just checked https://sgt-store.com/category/interior/?year_id=43789&make=68867&series=68868&category=123&action=vpf-ymm-search and this URL isnt cached, so excluding Queries from being cached works. But I dont understand what your problem is if more than 1 user searches the same? If a first request to a filter isnt cached the next user with same filter criterias gets a cached page, but each group of filter criterias generates a different URL, so each filter group has a different cached page. That means it is impossible that a user gets the same search result from another user if he uses different filter criteria! Hi @CacheCrawler , Thanks for reply. I think the plugin not just using $_GET parameters, if you get into the product categories and sub-cat with filtered results. You may see that the URL does include any other parameters. Is it possible to exclude caching by plugins? OR what other option I can try? Please suggest. Million thanks Sorry, I cant agree. Whenever I use the filter a URL with parameters is generated, but regardless of these parameters the cache plugin is a URL based page cache and whenever a URL changes a new static copy of the requested page is generated. That means that it doesnt matter if a URL is requested with or without parameters, it always is the same and if the URL changes a new copy is generated. I dont know where and how you see a filtered page without queries?! Your filtered URLs are already no-cacheIs it possible to exclude caching by plugins? No, because the cache is URL based and not plugin based.