• jorg953

    (@jorg953)


    Hello. How I can disable caching for all authorized users? Logged in users do not see the admin bar due to caching.

Viewing 3 replies - 1 through 3 (of 3 total)
  • veggroups

    (@veggroups)

    I also have this issue. Happens with 4.3.0 of the plugin, possibly other versions.

    In my case, I have a page set to bypass the cache based on a Cloudflare Page Rule. But when I am logged in as an admin and visiting the page Cloudflare is caching it even thought it says it shouldn’t be.

    From the response headers:

    Logged in, but passing POST data to the page:
    cf-cache-status: DYNAMIC
    cf-edge-cache: cache,platform=wordpress

    Logged in, but not passing POST data to the page:
    cache-control: no-cache, must-revalidate, max-age=0
    cf-apo-via: origin,page-rules
    cf-cache-status: BYPASS
    cf-edge-cache: no-cache

    Logged out, and passing POST data to the page:
    cf-cache-status: DYNAMIC
    cf-edge-cache: cache,platform=wordpress

    Logged out, and not passing POST data to the page:
    cf-apo-via: origin,page-rules
    cf-cache-status: BYPASS
    cf-edge-cache: cache,platform=wordpress

    • This reply was modified 4 years ago by veggroups.

    @jorg953 you have two options. If you have a business plan there is a page rule for bypass cache on cookie: https://support.cloudflare.com/hc/en-us/articles/236166048-Caching-Static-HTML-with-WordPress-WooCommerce

    Alternatively if you use APO, this is provided by default: https://support.cloudflare.com/hc/en-us/articles/360049822312-Understanding-Automatic-Platform-Optimization-APO-with-WordPress

    @veggroups you seem to be having a different issue. All the headers you provided would mean that Cloudflare is NOT caching those pages. Both BYPASS and DYNAMIC mean cloudflare is not returning a cached response.

    Using APO (with W3C Total Cache) and still logged in user page hits are cached and served to non-authenticated users. This was the reason I enrolled to the APO in the first place.

    cf-apo-via: origin,cookie
    cf-cache-status: HIT
    cf-edge-cache: no-cache
    cf-ray: 64a41f342bc94bc5-YUL
    cf-request-id: 09da71d49a00004bc5d9360000000001
    nel: {"report_to":"cf-nel","max_age":604800}
    report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?s=lOplVBJdWVv3FWjTLYylASc1oqjqUJhFzEZF0b4JUO5dkLov6ah9QhMLQswxlnWo33gXulY9L7ihcESdmw5xydY2fEcx0AadvEI%2BHn%2F%2B4jxHig%3D%3D"}],"group":"cf-nel","max_age":604800}
    • This reply was modified 3 years, 10 months ago by Bielousov.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disable cache for logged in users’ is closed to new replies.