Cache-Control:max-age ignored

Linus

New Member
#1
Hello,


Can someone help me out what is the maximum value of Cache-Control:max-age ?
(I am a wordpress user under shared hosting)
The problem i am experiencing is that the cache-control:max-age parameter ignores any value above 600.

Everything works as it should be BUT when i set
RewriteRule .* – [E=Cache-Control:max-age=[B]86400[/B]]
it justs ignores it and keeps the cache only for 10 minutes or 600 seconds.

When i hit the webpage for the first time i get X-Litespeed-Cache:”miss” in response header
After few seconds in another tab when i visit webpage for second time i get X-Litespeed-Cache:”hit”.

The problem is that if i wait for more than 10 minutes (600 seconds) when i visit the webpage for the third time i get X-Litespeed-Cache:”miss” which is NOT the desired behavior.
I should get X-Litespeed-Cache:”hit” –>see below my .htaccess file.

I would be more than helpful if someone could point me to a solution


<IfModule LiteSpeed>
#CacheEnable public /
CacheLookup public on
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(HEAD|GET)$
RewriteCond %{REQUEST_URI} !^/(wp-admin|wp-login.php|wp-cron.php)
RewriteRule .* – [E=Cache-Control:max-age=86400] </IfModule>

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
 

Linus

New Member
#3
Thanks for the quick answer.
I have responded to to the support section of your WordPress plugin page.
Will update this thread when hopefully there is a resolution in my issue
 

Michael A

Administrator
Staff member
#4
Hello again Linus,

The only thing I can think of that might be affecting this is the web server setting Public Storage Expire (minutes). This setting controls how long a cached file will be stored before the server will physically delete it. If it is set to a value lower than your public TTL of 86400 then that might explain what is happening.

Otherwise it would be helpful if you could private message me with root ssh access so that I can have a look.

Regards,
-Michael
 

Linus

New Member
#5
Thanks a lot for the recommendation Michael will check the setting with provider and will get back to you.
Unfortunately i am in a shared hosting environment so i do not have root ssh access :(
 
Top