Want To Add Extra Images Per Product Variation? Download This Free Plugin

ajax cached by litespeed cache automatically cleared after 3600s

VU Cong

Hi team

I checked and the ajax is cached by litespeed cache. However, only 3600s later, this cache was automatically deleted and had to be cached from the beginning. So the server becomes very slow again.

Looks like variation swatch cleared the entire page cache and I had to cache it all over again 🙁

https://prnt.sc/066kURz2JorR

https://prnt.sc/DwXwh_rn4mYk

https://prnt.sc/DZIzkFIqefl-

Thank You

Hakik Zaman

Hi VU,

Thanks for getting back to us. The screenshot you gave is not related to LiteSpeed Cache.

These are from the browser locale. We keep variation data in the user locale for one hour.

We clear it for that specific user, who is visiting your site. For best caching support, please enable object cache if your hosting support it.

I hope it will clear up your confusion.

Thank You

VU Cong

Hi Zalman

In my opinion, variation data ajax should be cached forever, it is only cleared when I clear cache at litespeed. Why do you delete it after 1 hour?

Thank You

Hakik Zaman

Hi VU,

In my opinion, variation data ajax should be cached forever

As I said before we cleared the browser locale cache after 1 hour. We don’t clear your LiteSpeed cache.

It shouldn’t be cached forever cause you may add new variations or new products. What will happen if it loaded the data from the cache, not the new product inserted?

Thank You

VU Cong

Hi Zaman,

I have tested and my pages cache is cleared. I don’t know why either

Because currently cache is only for 1 hour, after 1 hour all ajax will cache again leading to CPU Overload because each product has variation is 1 request, assuming there are 20 products with vairiation corresponding to 20 requests/1 user => FULL CPU

In my opinion, you should not automatically clear the cache but let it clear it manually. When adding new variation or new product, we will clear the cache in the litespeed section, so it will be more reasonable

Thank You

Hakik Zaman

Hi VU,

I am saying the same thing. It cached in an individual user’s browser locale. How do you clear your customer’s computer cache?

It does not seem like a good solution. I have already said if you want good caching support, you can use the server-side object cache. It will decrease your server load.

Thank You