New Server - How to know if cache is working fine

#1
Hello,

Recently we have moved to a new server and I am kind of dubious regarding the performance of our new server.


Would you please help me to make sure if LiteSpeed is correctly configured ?

I noticed that despite the fact that I enabled Private cache in LiteSpeed configurations, it says no cache !

Most important thing for me is caching and lowest possible page load time.

Thank you....


Here is the crul result of one of my websites :
Code:
macOS :~ b5a9s81$ curl -I https://domain.com

HTTP/1.1 200 OK

X-Powered-By: PHP/7.1.1

Content-Type: text/html; charset=UTF-8

X-LiteSpeed-Cache-Control: no-cache

Date: Sat, 18 Feb 2017 13:20:36 GMT

Accept-Ranges: bytes

Server: LiteSpeed

Connection: close
 

NiteWave

Administrator
#2
yes,
"X-LiteSpeed-Cache-Control: no-cache"
means cache not hit or working.

if a page successfully returned from a cache, should have this header:
"X-LiteSpeed-Cache: hit"
 
#3
Thank you for your reply,

Yeah I noticed that and this is so strange because I have Private Cache enabled and have WP LScache installed but it says no cache !

Any suggestions ?
 
#5
Sorry maybe I am wrong.

We have disabled Public Cache and used mass enable WP cache.

But as I showed this has not enabled caching for WP, so I went ahead and added below directives in .htaccess :

=================
<IfModule LiteSpeed>
RewriteEngine on
CacheLookup Public on
###LSCACHE START RESOURCE###
RewriteRule wp-content/.*/[^/]*(loader|fonts|\.css|\.js|\.jpg|\.png|\.html)\.php - [E=cache-control:max-age=43200]
###LSCACHE END RESOURCE###
###LSCACHE START FAVICON###
RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400]
###LSCACHE END FAVICON###

</IfModule>
================


I Parts which I added myself are marked with Bold/Red.


And would you please tell me if there is any suggestions to increase the litespeed performance (I have read your documentations regarding increasing performance and have done all parts which have been possible for us to perform).

And would you please tell me if this is possible to cache the Database queries using LiteSpeed cache ?

I have a 8Core/32GB VPS and LiteSpeed 2 CPU license.

Thankyou
 

NiteWave

Administrator
#6
the rewrite rule has no problem, though I think
RewriteRule wp-content/.*/[^/]*(loader|fonts|\.css|\.js|\.jpg|\.png|\.html)\.php - [E=cache-control:max-age=43200]
no need to modify, just revert to original one would be good.

what's your cache policy settings? have you followed
https://www.litespeedtech.com/suppo...tallation:cpanel-shared#cache_policy_settings
?

And would you please tell me if this is possible to cache the Database queries using LiteSpeed cache ?
no. lscache is kind of page cache like varnish, not for cache database query result.
 
Top