Still Getting Serve static assets with an efficient cache policy




Wordpress LScache Plugin: Still Getting Serve static assets with an efficient cache policy

Last Updated on: Wed, 15 Apr 2026 00:00:02
Im running WP 5.8 on CyberPanel 2.1.1 with the Litespeed Cache plugin 3.6.4 at Digital Ocean. I have Browser Caching enabled for 31536000 (1 year). No matter what I do, my max-age is still showing 7 days. I checked my .htaccess file. There is no rule for 7 days or 604800 seconds. BTW, I only have 1 .htaccess file at the root of the site. I do see a bunch of assets with A31536000 next to them, so I can its being applied. I even added this to the very bottom of my .htaccess file: Header set Cache-Control max-age=31536000, public I obviously purged all cache several times, but the issue persists. I tried different themes too. My DNS is pointed at Digital Ocean Im not using Cloudflare to manage DNS either. Tried the Github master 4.2 version ? no difference. https://cldup.com/yThcwYpppl.png Do I need to change something in the OpenLiteSpeed panel? (https://mydomain.com:7080) This is a bit confusing when there is 3 different documentations for WP LiteSpeed Cache plugin, OpenLiteSpeed control panel and CyberPanel. I dont know which to follow. Hi, if its OpenLiteSpeed please follow this https://openlitespeed.org/kb/how-to-set-up-custom-headers/ Best regards, Thanks for responding @CacheCrawler. Theres currently no custom headers set up under Virtual Hosts > Context. But, shouldnt the server just obey what has been added to my htaccess file already? These rules are listed at the very end of the file, too. Why should I need to set them up again in the OpenLiteSpeed control panel when Ive set them in the LiteSpeed plugin settings and manually added them to the htaccess file myself? Why should I have to be redundant 3 times? That seems a little crazy, but will try it anyway. no OLS only supports RewriteRule and RewriteCond any other directive in htaccess will be ignored , like ExpirebyType you need to create the context for headers you want to add ### Rewrite Rules Added by CyberPanel Rewrite Rule Generator RewriteEngine On RewriteCond % HTTPS !=on RewriteRule ^/?(. ) https://% SERVER_NAME /$1 [R,L] ### End CyberPanel Generated Rules. ### Rewrite Rules Added by CyberPanel Rewrite Rule Generator RewriteEngine On RewriteCond % HTTPS !=on RewriteRule ^/?(. ) https://% SERVER_NAME /$1 [R,L] ### End CyberPanel Generated Rules. # BEGIN LSCACHE ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## RewriteEngine on CacheLookup on RewriteRule . - [E=Cache-Control:no-autoflush] RewriteRule .litespeed_conf .dat - [F,L] ### marker CACHE RESOURCE start ### RewriteRule wp-content/. /[^/] (responsive|css|js|dynamic|loader|fonts) .php - [E=cache-control:max-age=3600] ### marker CACHE RESOURCE end ### ### marker LOGIN COOKIE start ### RewriteRule .? - [E=Cache-Vary:,wp-postpass_8cb83f8ac912f90f466f97029503fc74 ] ### marker LOGIN COOKIE end ### ### marker FAVICON start ### RewriteRule favicon .ico$ - [E=cache-control:max-age=86400] ### marker FAVICON end ### ### marker DROPQS start ### CacheKeyModify -qs:fbclid CacheKeyModify -qs:gclid CacheKeyModify -qs:utm CacheKeyModify -qs:_ga ### marker DROPQS end ### ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## # END LSCACHE # BEGIN NON_LSCACHE ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## ### marker BROWSER CACHE start ### ExpiresActive on ExpiresByType application/pdf A31536000 ExpiresByType image/x-icon A31536000 ExpiresByType image/vnd.microsoft.icon A31536000 ExpiresByType image/svg+xml A31536000 ExpiresByType image/jpg A31536000 ExpiresByType image/jpeg A31536000 ExpiresByType image/png A31536000 ExpiresByType image/gif A31536000 ExpiresByType image/webp A31536000 ExpiresByType video/ogg A31536000 ExpiresByType audio/ogg A31536000 ExpiresByType video/mp4 A31536000 ExpiresByType video/webm A31536000 ExpiresByType text/css A31536000 ExpiresByType text/javascript A31536000 ExpiresByType application/javascript A31536000 ExpiresByType application/x-javascript A31536000 ExpiresByType application/x-font-ttf A31536000 ExpiresByType application/x-font-woff A31536000 ExpiresByType application/font-woff A31536000 ExpiresByType application/font-woff2 A31536000 ExpiresByType application/vnd.ms-fontobject A31536000 ExpiresByType font/ttf A31536000 ExpiresByType font/otf A31536000 ExpiresByType font/woff A31536000 ExpiresByType font/woff2 A31536000 ### marker BROWSER CACHE end ### ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## # END NON_LSCACHE ### Rewrite Rules Added by CyberPanel Rewrite Rule Generator RewriteEngine On RewriteCond % HTTPS !=on RewriteRule ^/?(. ) https://% SERVER_NAME /$1 [R,L] ### End CyberPanel Generated Rules. cat: /home/spinlinedesign.com/public_html/.htaccess: No such file or directory # BEGIN WordPress # The directives (lines) between BEGIN WordPress and END WordPress are # dynamically generated, and should only be modified via WordPress filters. # Any changes to the directives between these markers will be overwritten. RewriteEngine On RewriteRule . - [E=HTTP_AUTHORIZATION:% HTTP:Authorization ] RewriteBase / RewriteRule ^index .php$ - [L] RewriteCond % REQUEST_FILENAME !-f RewriteCond % REQUEST_FILENAME !-d RewriteRule . /index.php [L] # END WordPress Header set Cache-Control max-age=31536000, public Expand yeah like I mentioned in previous only RewriteRule and RewriteCond in your htaccess will be processed by OLS, anything else , like ExpiresByType and Header directive will be ignored @CacheCrawler This will be ignored too? Header set Cache-Control max-age=31536000, public yes , ONLY rewriterule and rewritecond are supported by OLS in .htaccess , any other directive will be ignored Oh, just saw your response about Header being ignore too Much appreciated @CacheCrawler. That seemed to work following the OLS docs. I see here, https://docs.litespeedtech.com/lscache/lscwp/cache/#browser-tab the Browser Cache Settings within the plugin are for full-page cache, not for browser caching static assets such as images. To quote the docs: While it handles dynamically-generated content well, it only handles dynamically-generated content. Static content such as images, video, or fonts is not included in any full-page cache. yes OLS only supports rewriterule and rewritecond in .htaccess any other directive, like header , expirebytype , deny/allow , php_value , php_flag ?etc , are only supported by LiteSpeed enterprise



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference