Activate cache for a specific page

#1
Hi, I have a particular page that is not cached. The rest of the site is, but this is from a promotions module I just installed.

I tried this but it doesn't work. I still have 'x-litespeed-cache-control: no-cache'.

RewriteRule promo/page-slag - [E=cache-control:max-age=3600]

I have tried even:
CacheEnable public /promo/page-slag
 
#3
The site is Prestashop with LiteSpeed Cache Plugin v1.3.0 but I didn't found any option there for this so I was thinking to make a rule in htaccess.
 

serpent_driver

Well-Known Member
#6
Check your settings in LScache plugin. From outer view there is no reason why this page can't be cached, but btw. 17 MB for a single page is toooo much.
 
#7
I already checked the plugin settings. I not an expert in it but didn't found something that could help. Is there a section or an options related to this?

Is there a way though to add this page to the cache, through htaccess or other method?
 

serpent_driver

Well-Known Member
#8
Is there a way though to add this page to the cache, through htaccess or other method?
If this page is excluded, you can't overwrite this exclude setting. Cache plugin for PrestaShop has no settings to force caching for specific URLs.

Check black list in configuration tab or/and customize tab if this plugin is listed.
 
#13
I just checked your page again. Your complete shop has no-cache header, not only the page you are talking about. Have you enabled cache plugin?
Half an hour ago I disabled the Litespeed Cache from the Configuration tab and activated again. After reactivation, the header returns only 'x-litespeed-cache: miss'. Before that it was 'hit' in all pages, except the one with the problem.
 

serpent_driver

Well-Known Member
#16
I found nothing that can cause the issue, but I have a suspicion. Lscache plugin for PrestaShop seems to cache only pages that are categorized like homepage, category pages, product pages and so on. This plugin generates a page/URL that isn't categorized by cache plugin. Therefore this URL will not be cached, but we can do a test to check if I am right. I can't guarantee if this test works.

Add this:

Code:
RewriteCond %{REQUEST_URI} ^\/promo\/3-black-friday-2020
RewriteRule .* - [E=cache-control:max-age=86400]
before

Code:
</IfModule>
### LITESPEED_CACHE_END
in your .htaccess
 
Top