Wordpress LScache Plugin: How do you cache a json file?
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hello, Probably a dummy question, How do you cache a json file? I dont find the right place in the panel, Im a little lost I dont know if that could be done with this plugin, or if I need to tune my .htaccess file for that ? Indeed, amazing plugin, congratulation to all the dev team! Hi @ljvd, after you turned ON LiteSpeed Cache Settings > Cache > Cache REST API, wp-json will be cached automatically. You do not need to tune any .htaccess file manually. Thanks for this prompt answer @stanleylitespeed Unfortunately, it isnt about wp-json, it is a json file generated by a PWA plugin. Have you some tip about how to cache a specific file? Hi @ljvd, can you show me the link of the JSON response? @stanleylitespeed The file that I Would like to cache is here https://www.ljvd.com/superpwa-manifest.json Its mostly a static file ? If its a static file, it does not need to be cached because its already serving as the highest speed response without any backend PHP processing. So our plugin will not cache this type of file. Thanks for the explanation, so your service isnt appropriate for providing a cached delay for static files ? Could you explain more about the cached delay for static files? The file is without expiration date header. If I set up it in the excusion tab as Force URL caching /superpwa-manifest.json$ 604800 Despite a total cache purge both with litespeed and by bunnyCDN, that changes nothing ? Its mostly a GTMatrix challenge with few local webmasters, GTMatrix clames: Leverage browser caching for the following cacheable resources: https://www.ljvd.com/superpwa-manifest.json (expiration not specified) It now fixed with some hard directive, but its weird ? Here is the patch ExpiresActive On ExpiresDefault access plus 1 month Thank you for sharing this.
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference