• Resolved danniee

    (@danniee)


    When you use the cache plugin, is it normal for the admin toolbar at the top to be cached too? I noticed this when I installed a new plugin. It would not show up in the toolbar and I was forced to clear cache.

    Many thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @danniee

    I am sorry about the issue you are experiencing and I am happy to assist you with this.
    This happened because the page caching is enabled for logged-in users and the first time the page was visited it was cached with the admin bar.
    Go to Performance>Page Cache, enable the option “Don’t cache pages for logged in users”, save all settings and purge the cache. Make sure to check the website in the incognito window and logged out of the wp-admin.
    Thanks!

    Thread Starter danniee

    (@danniee)

    Hi @vmarko

    Thank you for the help. So I assume this is normal behavior when caching for logged in users is enabled?

    If I disable that option, caching won’t work for logged in users at all?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @danniee

    Yes if that option is enabled the pages will not be cached for logged-in users.
    It’s not recommended to cache pages for logged in users due to sensitive data.
    however, if you wish to do so, make sure that the first-page visit is while logged out to avoid caching of the admin bar.
    THanks!

    Thread Starter danniee

    (@danniee)

    Hello @vmarko

    Thank you again for your kind help. I’m just trying to learn here. So if logged in users are not recommended to be cached, and I can see why from your explanation, doesn’t that defeat the whole purpose of wanting to cache your site to make it faster? My site loads like 2 seconds slower without caching enabled :/

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @danniee

    Thank you for your question.
    The purpose of caching is to cache pages. So by disabling caching for logged in users, you are not disabling the Page Cache feature, simply the logged-in users will not be served with cached pages. The reason that caching for logged in users is not recommended is that some sensitive data may be served to other users.
    So to conclude, Enable Page Cache but disable caching for logged in users or keep it enabled at your own risk.
    Thanks!

    Thread Starter danniee

    (@danniee)

    Hi again @vmarko

    Excuse my ignorance and sorry for taking up your time. So fundamentally, logged in users will not get the benefit of caching on my site, is that correct?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @danniee

    Yes if the option “Don’t cache pages for logged in users” is enabled then it’s correct!
    Thanks!

    Thread Starter danniee

    (@danniee)

    @vmarko thanks a lot for your patience sir!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @danniee

    No problem. You are most welcome!

    thanks,,, for many years i just get this problem,
    since i use only “Don’t cache pages for following user roles” and work correctly
    but now not work correctly without “Don’t cache pages for logged in users”
    I enebled both, and might the similar problem resolved

    Thanks again @vmarko

    Sorry, for clarification
    My problem is persist because nginx rule miss, because i migrated last month
    So there the old nginx i still used

    if ($http_cookie ~* "(comment_author|wp\-postpass|w3tc_logged_out|w3tc_logged_YYYY|wptouch_switch_toggle)") {
        set $w3tc_rewrite 0;
    }

    then i check new rule was generated in W3TC

    if ($http_cookie ~* "(comment_author|wp\-postpass|w3tc_logged_out|w3tc_logged_XXXX|wptouch_switch_toggle)") {
        set $w3tc_rewrite 0;
    }

    I change YYYY to XXXX, the problem fixed
    My question, is the code for w3tc_logged_[……] always changed when i change the configuration of W3tc in same server installation? Because change the ngix need to restart nginx process

    Thanks in advanced @vmarko

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Admin toolbar cached?’ is closed to new replies.