Viewing 4 replies - 1 through 4 (of 4 total)
  • tzdk

    (@tzdk)

    Without going in to database you an see it with Debug Bar Transients http://ww.wp.xz.cn/plugins/debug-bar-transients/ Need Debug Bar as well of course. Name will be “cache-menu-XXXX” where Xs are random characters.

    Is cached for 12 minutes. Number can be changed via a filter. Because random name it might not be possible to invalidate sooner, like when you update menu.

    Can also see it working by checking number of mysql queires, will go down.

    Another way to notice is failure of CSS to highlight “current” menu item. Transient is static cache not real time. Is only sacrifice to make with transients vs. menus.

    Oops, checked it for real and it does invalidate per changes. Which might lead to a new question

    Invalid transient - the transient name was probably truncated. Limit is 64 characters. seems to pop up because of what it says. Hmm.

    Year old problem https://core.trac.ww.wp.xz.cn/ticket/15058 but inline docs have been updated https://core.trac.ww.wp.xz.cn/changeset/28735

    A story from real life where he used same code as this plugin to generate key. http://themergency.com/wordpress-developer-tip-dont-use-long-transient-names/

    So you cant really be sure it works unless you know transient is valid. Might not be.

    $cache_key = 'cache-menu-' . md5( serialize( $args ) ) . $version;

    can be trouble.

    Plugin Author Kaspars

    (@kasparsd)

    Thanks for reporting this, @tzdk. MD5 of anything in PHP will always be 32 characters long which in combination with “cache-menu-” (11 characters) makes it only 43 characters.

    Secondly, you are correct about missing “active” menu element indicators. I hope to solve this by adding some JS logic which adds the appropriate classes.

    Kaspars,

    You are incorrect. The transient name is too long and this plugin does not work out of the box due to this. Here is a more in-depth explanation:
    https://ww.wp.xz.cn/support/topic/currently-degrades-performance?replies=1

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

The topic ‘It works?’ is closed to new replies.