• Hello

    I do not know how to tell to LSCache to keep cached pages.
    Looks like cache for all URLs is automatically purged if just one post is updated.
    Also, I checked even if I do not update/publish any post, LSCache will update cache for some URLs.

    This is (I think most important) settings I have in LiteSpeed Cache Settings:
    General
    Cache enabled.
    Default Public Cache TTL = 31536000 (yes, that is 1 year, I tried with very long time to see how it will be)
    Default Front Page TTL = 31536000
    Default Private Cache TTL = 1800
    Default Feed, 403, 404, 500 TTL = 0

    Purge Settings
    Purge All On Upgrade = OFF
    Auto Purge Rules For Publish/Update = NOTHING CHECKED/SELECTED
    Scheduled Purge URLs = NOTHING SET/BLANK
    Scheduled Purge Time = NOTHING SET/NOT SET

    Do Not Cache Settings
    Do Not Cache URIs = (just two custom URLs)
    Do Not Cache Categories = NOTHING SET/BLANK
    Do Not Cache Tags = NOTHING SET/BLANK
    Do Not Cache Cookies = NOTHING SET/BLANK
    Do Not Cache User Agents = NOTHING SET/BLANK
    Do Not Cache Roles = ALL ROLES CHECKED/SELECTED

    _________
    URLs are cached (posts, pages, categories, tags) I can see “hit” in HTTP headers, but like I said If I update, publish new post(s) looks liek everything is cleared. Also, even if I do not even login to my site (no update/publish) most of cached URLs are not cached anymore. For example yesterday I logout of my site and opened several pages to cache them, this morning I opened them again and I get “miss” status. Like I said in meantime I did not even login to my site (some other users did, but with “contributor” role, without permission to publish created posts).

    If you have any questions or need anything please do not hesitate to aks.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support LiteSpeed Lisa

    (@lclarke)

    Hello.

    Thank you for sharing so many details.

    I suspect the problem is in the Do Not Cache Roles setting.
    By selecting all roles, you are telling LSCache not to cache pages for anyone who is logged in.

    Because of this setting, when you are verifying whether your site is cached, you must be sure that you are not logged in. Visit your site in an Incognito tab, and see what happens then.

    Let me know if you are still getting a miss! And if you are, please provide your URL so that we may have a look. Thanks!

    Plugin Support Hai Zheng?

    (@hailite)

    Alternatively you can also give a report number. You can check the debug log to see why and when and what is purged.

    Thread Starter Advanced SEO

    (@jole5)

    Hello.

    About Do Not Cache Roles setting.
    Yes, I do not wish that any url is cached for logged in user. Just administrator is logged in, and also I have option on site for visitors to register and login, they can register and login as “contributor” role.

    When I am (or any other user) logged in nothing is cached because of Do Not Cache Roles setting, and when any user is logged in this is in HTTP headers:
    x-litespeed-cache-control:no-cache

    Also, I am sure that I am not logged in when checking cache status.
    For example, after I logout I visit some URL, and I have this in HTTP Headers:
    x-litespeed-cache:miss
    after I refresh that same URL I have:
    x-litespeed-cache:hit

    Problem is that after some time (from few to several hours) practically all cache is purged, and it is also purged after I publish new posts.

    How to tell to LSCache to keep cached pages in cache until TTL expire?

    Thread Starter Advanced SEO

    (@jole5)

    Settings from LiteSpeed Cache Report v1.6.6.1

    LSCache Plugin Options
        version = 1.6.6.1
        radio_select = 1
        purge_upgrade = false
        cache_priv = false
        cache_commenter = false
        cache_rest = true
        cache_page_login = false
        timed_urls = 
        timed_urls_time = 
        cache_favicon = true
        cache_resources = true
        mobileview_enabled = false
        mobileview_rules = 
        cache_uri_priv = 
        cache_browser = false
        cache_browser_ttl = 2592000
        login_cookie = 
        check_advancedcache = true
        debug = 0
        admin_ips = 127.0.0.1
        debug_level = false
        log_file_size = 3
        heartbeat = true
        debug_cookie = false
        collaps_qs = false
        log_filters = false
        log_ignore_filters = gettext
    gettext_with_context
    get_the_terms
    get_term
        log_ignore_part_filters = i18n
    locale
    settings
    option
        public_ttl = 31536000
        private_ttl = 1800
        front_page_ttl = 31536000
        feed_ttl = 0
        403_ttl = 0
        404_ttl = 0
        500_ttl = 0
        purge_by_post = 
        excludes_uri = ^edit
    ^img-url
        excludes_qs = slideshow
    slideshow-pause
    s=
    image=
    p=
    pid=
    download
    &
        excludes_cat = 
        excludes_tag = 
        css_minify = false
        css_combine = false
        css_combined_priority = false
        css_http2 = false
        css_exclude = 
        js_minify = false
        js_combine = false
        js_combined_priority = false
        js_http2 = false
        js_exclude = 
        optimize_ttl = 604800
        html_minify = false
        optm_qs_rm = false
        optm_ggfonts_rm = false
        optm_css_async = false
        optm_js_defer = false
        optm_emoji_rm = false
        optm_excludes = 
        optm_exclude_jquery = true
        optm_ggfonts_async = false
        cdn = false
        cdn_ori = 
        cdn_url = 
        cdn_inc_img = false
        cdn_inc_css = false
        cdn_inc_js = false
        cdn_filetype = .aac
    .css
    .eot
    .gif
    .jpeg
    .js
    .jpg
    .less
    .mp3
    .mp4
    .ogg
    .otf
    .pdf
    .png
    .svg
    .ttf
    .woff
        cdn_exclude = 
        cdn_remote_jquery = 0
        media_img_lazy = false
        media_img_lazy_placeholder = 
        media_iframe_lazy = false
        media_img_optm_cron_off = false
        media_img_webp = false
        media_img_webp_only = false
        media_img_exif = false
        media_img_webp_lossless = false
        nocache_cookies = 
        nocache_useragents = 
        crawler_include_posts = false
        crawler_include_pages = false
        crawler_include_cats = false
        crawler_include_tags = false
        crawler_excludes_cpt = 
        crawler_order_links = date_desc
        crawler_usleep = 500
        crawler_run_duration = 400
        crawler_run_interval = 600
        crawler_crawl_interval = 302400
        crawler_threads = 3
        crawler_load_limit = 1
        crawler_domain_ip = 
        crawler_custom_sitemap = 
        crawler_cron_active = false
        esi_enabled = false
        esi_cached_admbar = true
        esi_cached_commform = true
    Plugin Support Hai Zheng?

    (@hailite)

    There is no way to force cache expired only when TTL expired. If you don’t have any Purge All related actions but get purged somehow, please check the debug log and search Purge header, that can help you figure out when its purged and why.

    Thread Starter Advanced SEO

    (@jole5)

    Hello

    I turned on debug log, after it started to fill quickly (more than 2MB).
    I searched inside that file for “Purge” and I found 25 results, for example:

    12/11/17 16:49:14.139 [77.46.179.51:62993 1 CC9] not cacheable before ctrl finalize
    12/11/17 16:49:14.139 [77.46.179.51:62993 1 CC9] Router: get_uid: 322
    12/11/17 16:49:14.139 [77.46.179.51:62993 1 CC9] Router: get_role: contributor
    12/11/17 16:49:14.139 [77.46.179.51:62993 1 CC9] Vary: can_change_vary bypassed due to ajax call
    12/11/17 16:49:14.139 [77.46.179.51:62993 1 CC9] Vary: finalize bypassed due to no vary 
    12/11/17 16:49:14.140 [77.46.179.51:62993 1 CC9] X-LiteSpeed-Cache-Control: no-cache
    12/11/17 16:49:14.140 [77.46.179.51:62993 1 CC9] X-LiteSpeed-Purge: public,stale,4c31_Po.379315,4c31_URL.6666cd76f96956469e7be39d750cc7d9,4c31_W.recent-posts-2,4c31_Po.378324,4c31_REST
    12/11/17 16:49:14.140 [77.46.179.51:62993 1 CC9] Optimizer bypass: Not frontend HTML type
    12/11/17 16:49:14.140 [77.46.179.51:62993 1 CC9] End response

    But, I don’t know what it means, aldought, I think that “get_uid: 322” is maybe ID of logged in user (Contributor role)

    Thread Starter Advanced SEO

    (@jole5)

    And like this:

    12/11/17 16:50:35.014 [77.46.179.51:62993 1 Ct4] --------purge_tags prev is: 378324
    12/11/17 16:50:35.014 [77.46.179.51:62993 1 Ct4] Purge: added Po.379319,URL.6666cd76f96956469e7be39d750cc7d9,W.recent-posts-2,Po.378324
    12/11/17 16:50:35.014 [77.46.179.51:62993 1 Ct4] X-LiteSpeed-Purge: public,4c31_Po.379319,4c31_URL.6666cd76f96956469e7be39d750cc7d9,4c31_W.recent-posts-2,4c31_Po.378324
    12/11/17 16:50:35.014 [77.46.179.51:62993 1 Ct4] Purge: added REST
    12/11/17 16:50:35.014 [77.46.179.51:62993 1 Ct4] X-LiteSpeed-Purge: public,4c31_Po.379319,4c31_URL.6666cd76f96956469e7be39d750cc7d9,4c31_W.recent-posts-2,4c31_Po.378324,4c31_REST
    12/11/17 16:50:35.014 [77.46.179.51:62993 1 Ct4] X Cache_control -> stale
    12/11/17 16:50:35.080 [186.32.156.35:62250 1 AW5] Router: get_uid: 0
    12/11/17 16:50:35.080 [186.32.156.35:62250 1 AW5] Router: get_role: 
    12/11/17 16:50:35.080 [186.32.156.35:62250 1 AW5] Router: role: guest
    12/11/17 16:50:35.080 [186.32.156.35:62250 1 AW5] Vary: role id: failed, guest
    12/11/17 16:50:35.080 [186.32.156.35:62250 1 AW5] Vary: finalize bypassed due to no vary 
    12/11/17 16:50:35.080 [186.32.156.35:62250 1 AW5] X-LiteSpeed-Cache-Control: public,max-age=31536000
    12/11/17 16:50:35.080 [186.32.156.35:62250 1 AW5] X-LiteSpeed-Tag: 4c31_URL.d0e6fd746324214bc1babd6192f890c1,4c31_Po.216236,4c31_
    12/11/17 16:50:35.102 [186.32.156.35:62250 1 AW5] Optimizer bypass: Not frontend HTML type
    12/11/17 16:50:35.102 [186.32.156.35:62250 1 AW5] End response
    Plugin Support Hai Zheng?

    (@hailite)

    You can click Purge All from backend, and see the related log, you will know what it looks like when doing a purge all. Then you can tail the log and see when you can have that X-LiteSpeed-Purge with purge all info comes again.

    A purge all log is like X-LiteSpeed-Purge: public,0051_

    Thread Starter Advanced SEO

    (@jole5)

    When I activate debud log, it fills debug log, after several minutes it is 3MB, and it is reseted to zero. I can rise up debug file size, but that is not solution. I am trying for days to figure it out, (you can see my config above), no metter what I do, I can not find URL which is cached more than several hours ago.

    Site speed is 3-4 times higher/worse (according to crawl statistics inside webmaster search console) than it was before while using another WP caching plugin.

    I think I will delete LSCache and get back to previous plugin.

    Plugin Support Hai Zheng?

    (@hailite)

    Sure you can do what you want. Just in case you want to figure out the reason, you can create a ticket if you can’t capture which caused the purge action. We can figure it out.

    Best,
    Hai

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Cache is automatically purged’ is closed to new replies.