• Resolved Dan14

    (@dan14)


    I have set cache control, must revalidate. This is emmoerce website with logins and registration. I use nav-menu roles plugin for changing the menu for logged in users so that there are 2 sets of menus, for logged-in and logged out. The menu is from theme.

    When object cache is enabled (before enabling object cache it works as expected) certain pages load the cached menu for logged-in users. How can I exclude the nav-menu roles from cache for logged in uers? I do have no cache for logged in users, which works fine aside that menu in specific pages.

    Its a free plugin: https://wordpress.org/plugins/nav-menu-roles/

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

    (@vmarko)

    Hello @dan14

    Thank you for your inquiry and I am happy to assist you with this.
    Just to confirm everything works as expected with no Object Cache enabled but when you enable Object Cache the issue starts to occur?
    If that’s the case then it’s the first kind of issue like this reported.
    What is the caching method you are using for Object Caching? Are you on shared hosting?
    Thanks!

    Thread Starter Dan14

    (@dan14)

    Shared hosting, using object cache, disk. I am not sure why this is happening to be honest. I dont see this on all pages, only on certain pages but same plugins run on same pages so I dont know why. Excluding nav mene roles from cache for logged in users will probably solve it. I am excluding all cache for logged-in users already.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @dan14
    Thank you for the information.
    I just want to double-check if the issue only occurs when you enable Object Caching?
    Try disabling the Set expires header in Performance>Browser Cache>HTML&XML and see if the issue persists.
    As for the object caching, Object Cache allows getting data from the database more efficiently. Its purpose is similar to what Database Cache does. But compared to Database Cache, Object cache is more efficient as it allows us to process fewer requests.
    As a rule of thumb, Object Cache is not worth using on shared hosting for the same reason as Database Cache, i.e. database is often not the performance bottleneck, but disk input-output operations. However, like Database Cache, it can be beneficial to use if you are on VPS or a dedicated server, get a lot of traffic, have a lot of comments. Also, if you know that database is the bottleneck of your website performance, then Object Cache (like Database Cache) is beneficial to use. But in this case, it’s recommended to use, Memcached, or Redis options.
    Thanks!

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

The topic ‘Excluding plugin from cache for logged-in users (object cache)’ is closed to new replies.