1) One of subdomain is used for storing static CSS and JS files. I notice the hit rate is always zero. Does LS cache static files? I understand caching static file does not help in improving the speed but I just want to know.
2) I used the following .htaccess file. Basically if the time is between 1900h and 2200h, the cache time is 180s. Otherwise, the cache time is 24hour. This does not work.
After 1900h, the pages stay the same. I remove all the time in the htaccess file and just use the fix TTL of 180s. Nothing change.
In the end, I have to delete all cache files to refresh the content in the pages.
Does LiteSpeed store the TTL in the cache file? Or LiteSpeed uses the cache file's date-time stamp?
Thanks in advance for any help.
2) I used the following .htaccess file. Basically if the time is between 1900h and 2200h, the cache time is 180s. Otherwise, the cache time is 24hour. This does not work.
After 1900h, the pages stay the same. I remove all the time in the htaccess file and just use the fix TTL of 180s. Nothing change.
In the end, I have to delete all cache files to refresh the content in the pages.
Does LiteSpeed store the TTL in the cache file? Or LiteSpeed uses the cache file's date-time stamp?
Code:
RewriteEngine On
RewriteCond %{REQUEST_URI} !\.(png|txt|ico|gif|css|jpg|jpeg)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{TIME_HOUR}%{TIME_MIN} <1900
RewriteCond %{ORG_REQ_URI} !/admin
RewriteRule .* - [E=Cache-Control:max-age=86400,L]
RewriteCond %{TIME_HOUR}%{TIME_MIN} >2200
RewriteCond %{ORG_REQ_URI} !/admin
RewriteRule .* - [E=Cache-Control:max-age=86400,L]
RewriteCond %{TIME_HOUR}%{TIME_MIN} >1900
RewriteCond %{TIME_HOUR}%{TIME_MIN} <2200
RewriteCond %{ORG_REQ_URI} !/admin
RewriteRule .* - [E=Cache-Control:max-age=180,L]
Last edited by a moderator: