[Solved] What are these values generated by litespeed

#1
Hi,
I am on shared host who has litespeed server and I've installed wordpress and LScache plugin too. It's working great and super fast.
My http headers now look as follows:-
Code:
cache-control: max-age=3600, public
x-litespeed-cache-control: public,max-age=86400
x-litespeed-tag: edc1_PGSRP,edc1_URL.a8f2a09ea42fdf53a310d5dfd9f285a6,edc1_Po.11,edc1_
Note: I've set .php pages to be cached in browser for 3600 seconds.
I have questions regarding litespeed:
1. Is litespeed webserver caching my page on server (disk) ? (there's no x-litespeed: hit header)
2. What does x-litespeed-cache-control do? Does it caches the page on my server for 86400 seconds or on user's browser?
3. What does the above x-litespeed-tag: (with value) means?

Can someone from litespeed please guide me on this? thanks.
 
Last edited by a moderator:

Michael A

Administrator
Staff member
#2
Hello JenK,

1. Is litespeed webserver caching my page on server (disk) ? (there's no x-litespeed: hit header)
If the cache plugin is working correctly, yes the files will be stored on disk. You should be seeing the X-Litespeed-Cache: miss/hit header in this case. You can check this section of our installation wiki to help confirm : https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:installation#testing

2. What does x-litespeed-cache-control do? Does it caches the page on my server for 86400 seconds or on user's browser?
This should cache your page for 86400 seconds on the server, not the clients browser. Dynamically generated pages shouldn't be browser cached by default (server setting). Also worth noting is that that cache plugin will use intelligent purging to automatically purge a page (and all related pages) when a change is detected which brings us to...

3. What does the above x-litespeed-tag: (with value) means?
The x-litespeed-tag header is shown when LiteSpeed is attempting to cache the visited page with these tag values. They are used in the plugin's smart purge to help purge groups of related pages when needed.

I hope this helps to answer some of your questions.

Regards,
-Michael
 
#3
thanks for the answers. that really helped.
But regarding my question no. 1,
1. Is litespeed webserver caching my page on server (disk) ?
the header does not contain these values:
x-litespeed-cache: hit OR x-litespeed-cache: miss
even if i refreshed, or browsed from another device, etc. I never get the above header values.
Does that means my web hosting provider has not enabled "Caching" on server-side?

here are the values from LSCache Report about the Server:
Code:
Server Variables
    SERVER_SOFTWARE = LiteSpeed
    DOCUMENT_ROOT = /home/blog2cheaphostin/public_html
    X-LSCACHE = on
    LSWCP_TAG_PREFIX = edc
    WP_SITEURL = NULL
    WP_HOME = NULL
    WP_CONTENT_DIR = /home/blog2cheaphostin/public_html/host2/wp-content
    SHORTINIT = false
    LSCWP_CONTENT_DIR = /home/blog2cheaphostin/public_html/host2/wp-content
    LSCWP_CONTENT_FOLDER = wp-content
    LSCWP_DIR = /home/blog2cheaphostin/public_html/host2/wp-content/plugins/litespeed-cache/
    LITESPEED_TIME_OFFSET = 0
    LITESPEED_SERVER_TYPE = LITESPEED_SERVER_ENT
    LITESPEED_CLI = NULL
    LITESPEED_ALLOWED = true
    LITESPEED_ON = true
    LITESPEED_ON_IN_SETTING = true
    LSCACHE_ADV_CACHE = true
 
Last edited by a moderator:

Michael A

Administrator
Staff member
#4
Your environment report looks alright to me.

Yes, if you are not seeing "miss" it usually means that the server is not checking for the cached file which could mean that your hosting provider has likely misconfigured LSCache in some way.

I would recommend contacting them about the issue and having them submit a ticket with us if they run into any trouble.
 
#8
I also have a question.... I am also on shared hosting and also experienced the same thing as JenK.

I checked http header to see if caching is working and there is no x-litespeed: hit or miss. So, I checked the lscache folder just to make sure and did saw that it was empty.

Contacted my hosting provider and they did solved the problem. I checked Http header again and it now shows x-litespeed: hit or miss. I also checked the lscache folder again and its filled up with subfolders now from 0 to priv.

But upon checking inside each subfolder, it is empty... it has still no cached files...

Do you think it is really caching my website?
 
#10
verify if cache is working, you should check header to see "X-LiteSpeed-Cache: hit". If it is hit, then that particular page is cached. If not "hit" then, not cached yet. You should check other pages as well. Don't worry about cache folder since it can be purged or change to other location.
https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:installation#testing
Thanks for the info, but Im just worried since no cached files have yet to appear inside those subfolders from lscache....
 

Michael A

Administrator
Staff member
#11
Hello PsychoSlap,

Pong is right here, as long as you are seeing 'hit' in your headers your site should be running well. In fact I do not think those 0 to etc sub folders will exist in that directory before some content is cached.

If still in doubt, try visiting your site as a logged out user and checking the load time during a hit, you should be seeing much faster speeds here as well.

Regards,
-Michael
 
#12
Hello PsychoSlap,

Pong is right here, as long as you are seeing 'hit' in your headers your site should be running well. In fact I do not think those 0 to etc sub folders will exist in that directory before some content is cached.

If still in doubt, try visiting your site as a logged out user and checking the load time during a hit, you should be seeing much faster speeds here as well.

Regards,
-Michael
Thanks Michael and Pong :)
Well, I did see an increase of speed based on website speed test checkers and my own eyes.... :)
Thanks for clarifying things for me... :)
Cheers!
 
Top