• When using plugin with W3 Total Cache, menu links are getting cached and negating whole purpose of plugin. For example, it would be nice to have “login” menu link for logged out users, and “logout” link for logged in users. But when using cache, this doesn’t work properly (as expected).

    Is there a method to have menu links load with ajax, so that these links do not get cached? Or is there is another method to prevent cache?

    Thanks for any suggestions.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author HelgaTheViking

    (@helgatheviking)

    Have you asked W3TC how to prevent something from being cached? I am not familiar enough with their plugin to advise. And I usually believe everything is possible given enough time or resources, so I’m sure you could load the menu via ajax, but that’s not a built-in aspect of the NMR plugin and it’s a pretty custom job.

    Thread Starter andrew55

    (@andrew55)

    Thanks for the reply. I believe both W3TC and Super Cache both have methods for preventing cache on parts of a page:

    WP Super Cache uses “cacheaction filter” which is detailed here:

    https://odd.blog/2013/10/21/shiny-new-dynamic-content-wp-super-cache/

    W3TC uses “fragment cache” but it looks like it’s only with their premium plugin.

    Both of these options are way over my head, and it looks like it’s really up to a plugin author to set it up. This is why I was asking about ajax as an alternative.

    It’s an issue. Cache plugins are critical for page speed and server resources. My hosting company almost demands that we use a cache plugin.

    But then, it’s tricky to prevent certain dynamic elements from getting cached on a page, which hurts the user’s experience. For example, showing a simple login or logout link for the user, based on their status.

    This is so now more than ever, as WP is moving from a blogging platform into a full website management system.

    I’d be happy to pay a developer for help with this, but not even sure which direction to go. Thanks for any suggestions.

    Plugin Author HelgaTheViking

    (@helgatheviking)

    I’m sure you could load the menu via ajax. I don’t know if that’s the best solution, but I know it’s possible and perhaps easier to implement than cache compatibility.

    This question has some hints: https://stackoverflow.com/questions/11501581/wordpress-menu-ajax-loading
    You may want to post a gig at https://codeable.io/ I can’t take any new work right now.

    If you solve it, it’d be great if you could share.

    Thread Starter andrew55

    (@andrew55)

    Yes, I did see that stack discussion also, in my exhaustive search for answers. I will chew on this some more, and if I come up with anything, I will be sure to post it here. Thanks for the help and suggestions.

    Plugin Author HelgaTheViking

    (@helgatheviking)

    Appreciate that. It’s a busy time for me or I’d dig into it a bit more.

    kiernan7

    (@kiernan7)

    Somehow, I’m getting CCed on all of these. I had a different problem.

    Having issues with caché and this plugin too.

    Is there anything that can be done within the plugin to force the cache to clear on login/log out?

    Thread Starter andrew55

    (@andrew55)

    I was able to get it resolved by using javascript in menu. This bypasses cache. I purchased pro version of “wp mobile menu” and the plugin author created the javascript workaround for me (for a fee). You can contact him and see if it’s now part of the pro plugin:

    https://www.wpmobilemenu.com/

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Nav Menu Roles – issue with cache’ is closed to new replies.