![]() |
Private cache max-age ?
Hello,
Your wiki says to use E=Cache-Control:max-age=60 for 60 seconds public cache and E=Cache-Control:private for private cache. Both of these work with .htaccess and mod_rewrite rules Can I set the max-age for private cache in htacess files ? Or can users only use the server global defined private cache max-age value ? Thanks |
Quote:
|
Thanks,
How would I do this ? All my tries failed… |
for example, in .htaccess,
Code:
RewriteRule \.php - [E=Cache-Control:private,E=Cache-Control:max-age=300]Code:
RewriteRule \.php - [E=Cache-Control:private] |
Thanks,
I was under the impression that those lines would first set the envrionement variable to private and then replace the private setting by max-age=300 thus being the equivalent of only max-age=300… With Apache's mod_cache, Cache-Control should be set to : "max-age=300, private" |
I've just tested :
RewriteRule \.php - [E=Cache-Control:private,E=Cache-Control:max-age=300] Code:
X-LiteSpeed-Cache : hitRewriteRule \.php - [E=Cache-Control:private] Code:
X-LiteSpeed-Cache : hit,private |
hmm ... I'd like to reproduce your result, to find out possible bugs.
what's the cache policy you set ? and any other rewrite rules ? I did tests only for this simple php: PHP Code:
|
Hello,
My .htaccess file : Code:
RewriteEngine OnCache-Crontrol is an environement variable, if you set it twice it's normal that the second value replaces the first. You need to be able to set both values seperated by a comma. However I havn't found the correct syntax to do this : I've tried without success things like this : Code:
RewriteRule \.php - [E=Cache-Control:'private, max-age=180']Code:
ERROR [[HTAccess]] rewrite: Unknown rewrite rule flag while parsing: RewriteRule \.php - [E=Cache-Control:'private, max-age=180']Code:
Enable Cache : Not Set |
my test result always:
Code:
X-LiteSpeed-Cache: hit,privateCode:
~>curl -i 127.0.0.1/r.php |
Quote:
Is 4.2.2 in Release ? In my WHM interface it says : Latest Release: 4.2.1 I prefer to wait untill version 4.2.2 shows as an available update in the WHM interface unless the update feature doesn't work and will never show the next version ? |
| All times are GMT -7. The time now is 07:49 PM. |