[Solved] What are these values generated by litespeed

Discussion in 'General' started by JenK, Aug 29, 2018.

  1. JenK

    JenK Member

    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:-
    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: Aug 29, 2018
  2. Michael A

    Michael A Administrator Staff Member

    Hello JenK,

    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

    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...

    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.

  3. JenK

    JenK Member

    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:
    Server Variables
        SERVER_SOFTWARE = LiteSpeed
        DOCUMENT_ROOT = /home/blog2cheaphostin/public_html
        X-LSCACHE = on
        LSWCP_TAG_PREFIX = edc
        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_ALLOWED = true
        LITESPEED_ON = true
        LSCACHE_ADV_CACHE = true
    Last edited by a moderator: Aug 30, 2018
  4. Michael A

    Michael A Administrator Staff Member

    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.
  5. JenK

    JenK Member

    okay. thanks for information. will contact them and let them know.
  6. JenK

    JenK Member

    update: they've configured their server and now site's http headers are displaying x-litespeed-cache: hit
    Michael A likes this.
  7. Michael A

    Michael A Administrator Staff Member

    Great! Thanks for the update :)
  8. PsychoSlap

    PsychoSlap New Member

    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?
  9. Pong

    Pong Well-Known Member Staff Member

  10. PsychoSlap

    PsychoSlap New Member

    Thanks for the info, but Im just worried since no cached files have yet to appear inside those subfolders from lscache....
  11. Michael A

    Michael A Administrator Staff Member

    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.

  12. PsychoSlap

    PsychoSlap New Member

    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... :)
    Michael A likes this.

Share This Page