litespeedtech / lscache_prestashop

LiteSpeed Cache Plugin for Prestashop
GNU General Public License v3.0
26 stars 16 forks source link

Admin is always cached. #40

Closed lordchukz closed 1 year ago

lordchukz commented 4 years ago

Hi everyone,

My Admin is always cached which prompts me to always clear the lscache when working.

Can somebody help me with the right .htaccess configuration for lscache? I have tried different configurations, but non of them seems to work.

This is the configuration I'm using at the moment:

RewriteEngine On RewriteCond %{REQUEST_METHOD} ^HEAD|GET$ RewriteCond %{HTTP_HOST} ^mydomain.com [NC] [OR] RewriteCond %{HTTP_HOST} ^mydomain.com [NC] RewriteRule .* - [E=Cache-Control:max-age=120] RewriteCond %{REQUEST_METHOD} ^HEAD|GET$ RewriteCond %{HTTP_HOST} ^https://mydomain.com/admin$ [NC] RewriteCond %{HTTP_HOST} ^https://mydomain.com/admin/index.php/configure/advanced/performance$ [NC] RewriteRule .* - [E=Cache-Control:no-cache] CacheLookup on RewriteEngine on RewriteCond %{HTTP_COOKIE} !PrestaShop- RewriteRule .* - [E=Cache-Control:vary=guest]

LITESPEED_CACHE_END

Thanks a lot.

litespeedtech commented 1 year ago

When you use the cache plugin, you do not need to manually set no-cache in rewrite rules. I think your server cache store config is wrong. revert to default way should work.