[Cache] not working
-
Hi,
I’m configuring LiteSpeed Cache away from Swift Performance to test performance. But the server cache does not work. I’m on a hosting with a Litespeed server (Namehero):
https://i.ibb.co/7YcBt87/lspeednocache.pngThe page I need help with: [log in to see the link]
-
Of course, cache is working. Check response headers.
x-litespeed-cache: hit
but there is non default modification in your .htaccess that prevents correct browser caching for dynamically generated sources.
- This reply was modified 1 year, 6 months ago by serpentdriver.
Hi,
Thank you for quick the answer. Could you tell me what part of the code is wrong? Here is the .htaccess: https://codeshare.io/8p31MJ
I haven’t modified it. In fact the support agent reseted it to make the staging environment accessible:
Hello,I have reset .htaccess file and updated Site URL and Home URL in wp-config.php. Now the stage website is loading fine.
Please do check and let me know if you have any questions.
Sincerely,
=========
[ Emails deleted, don’t post those again ]
Thank you in advance,Alex
- This reply was modified 1 year, 6 months ago by Jan Dembowski.
I’ve checked your .htaccess and can’t find anything unusual. The cause can also be caused by a PHP response header that another plugin has set. Are you using the LiteSpeed webserver or OpenLiteSpeed?
LiteSpeed webserver
Then, check your installed plugins which could cause it. You give yourself a speed advantage.
Swift Performance caching works fine. I’ve disabled all performance plugins except Asset Cleanup (which doesn’t make any changes to headers) and LiteSpeed’s cache still doesn’t work. Here is the list of enabled plugins: https://codeshare.io/zymLjD
I’m sorry but I failed to understand , what exactly is the issue now ?
Let me asking you a question. What do think will happen if you cache a already cached page?
Think carefully about the answer because your answer decides whether you can be helped or not.
it depends , but in case of LSWS/OLS + LSCWP + other cache , LSCache will probably cache again the cached page.
@serpentdriver I am not saying that Swift Performance is active… I know a little about WPO, at least enough to know that it makes no sense to do that. I am saying that Swift Performance caching works perfectly well, because I have tested it. But Lite Speed does not. Swift Performance is not active. As you can see in the list of plugins I have attached.
@qtwrk the problem is that I have installed LS on my staging to test it and decide whether to replace it with Swift Performance, but the pages are not being served cached.what makes you think of that ?
from the http resposne header, you can see
x-litespeed-cache: hti
this indicates the page is cached by LSCache.- If you load a page from a browser/ip you’ll see it takes several seconds to charge. Then if you refresh it from the sape browser/ip you’ll see it loads in a few ms. But if you change the ip you’ll see the same page takes several seconds again to charge.
- Request timeout error:
https://i.ibb.co/C2vbPtg/request-timeout.png - Google page speed are not being able to load the pages that are being served with Lite Speed active. Example: https://pagespeed.web.dev/analysis?url=https%3A%2F%2Fstaging.educaenvivo.com%2Fcuentos-infantiles%2F25-cuentos-con-pictogramas-pdf-imprimibles-y-gratuitos%2F
- If you analyse the same page with Swift performance activated (unoptimized but with cache activated) Page speed insights can make the test. Example in the main domain: https://pagespeed.web.dev/analysis/https-educaenvivo-com-cuentos-infantiles-25-cuentos-con-pictogramas-pdf-imprimibles-y-gratuitos/oajzvnh1mu?form_factor=mobile
- it works fine on , did you check it as login user ?
- that should be something else , you may need to check your server log
- 4. PSI seem work on me
Yes, I finally got it to work. Thank you @qtwrk :’)
Topic solved!
you should probably look at here https://docs.litespeedtech.com/lscache/lscwp/toolbox/#purge-by
- The topic ‘[Cache] not working’ is closed to new replies.