• Resolved blindpet

    (@blindpet)


    I am using nginx and php7, when enabling redis object cache plugin query monitor does not display the admin toolbar.

    I had the same issue with php-apcu and it was fixed by making some functions public https://ww.wp.xz.cn/support/topic/incompatible-with-query-monitor-2/#post-8192088.

    I tried the same thing with this plugin but it didn’t work. I’m not PHP developer so this was just best guess work.

    class WP_Object_Cache {
    
    	/**
    	 * The Redis client.
    	 *
    	 * @var mixed
    	 */
    	public $redis;
    
    	/**
    	 * Track if Redis is available
    	 *
    	 * @var bool
    	 */
    	public $redis_connected = false;
    
    	/**
    	 * Holds the non-Redis objects.
    	 *
    	 * @var array
    	 */
    	public $cache = array();
    
    	/**
    	 * Name of the used Redis client
    	 *
    	 * @var bool
    	 */
    	public $redis_client = null;
    
    	/**
    	 * List of global groups.
    	 *
    	 * @var array
    	 */
    	public $global_groups = array( 'users', 'userlogins', 'usermeta', 'site-options', 'site-lookup', 'blog-lookup', 'blog-details', 'rss' );
    
    	/**
    	 * List of groups not saved to Redis.
    	 *
    	 * @var array
    	 */
    	public $ignored_groups = array( 'comment', 'counts' );
    
    	/**
    	 * Prefix used for global groups.
    	 *
    	 * @var string
    	 */
    	public $global_prefix = '';

    I would like to use query monitor to benchmark memcached, redis and apcu

    • This topic was modified 9 years, 7 months ago by blindpet.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    I’d suggest you ask the author of that plugin to ensure object cache compatibility or if you get help, submit a PR on GitHub.

    Thread Starter blindpet

    (@blindpet)

    In the case with memcached is your friend, the plugin itself needed to be modified (not query monitor).

    With php-acpu the plugin itself needed to be modified (not query monitor).

    I don’t think it will have anything to do with query monitor needing modification, in both cases it has been an object-cache.php modification that was necessary.

    Plugin Author Till Krüss

    (@tillkruess)

    Okay, thanks for letting me know. I probably won’t look into this, since it’s just another dev tool. You’re welcome to submit a fix anytime via GitHub.

    Plugin Author Till Krüss

    (@tillkruess)

    If you can dig up with Git/SVN commits that fixed the query monitor support with APCu or Memcached, I can probably fix it.

    Thread Starter blindpet

    (@blindpet)

    If I had the fix I would submit a patch 😉 I am not a PHP developer so all I can do is try things and hope they work or ask experts like yourself.

    The memcached fix came from the ElasticPress developer

    For memcached the commits that fixed it are here

    The APCu fix came from me just changing stuff and hoping it would work

    I just forked the APCu so you can see the file changes clearly compared to the original this post.

    Hopefully this is enough and when you find the solution I can post the benchmarks.

    Thank you

    Plugin Author Till Krüss

    (@tillkruess)

    I just tested:

    – WordPress 4.6.1
    – Redis Object Cache 1.3.3
    – Query Monitor 2.13.1

    And it seems to be working:

    Thread Starter blindpet

    (@blindpet)

    When I clear transients and flush cache it starts working! Memcached and APCu didn’t have to do this, perhaps those flush cache upon activation.

    Thanks.

    Plugin Author Till Krüss

    (@tillkruess)

    Could you find out if it’s the the cache flush OR the transient flush that makes it work?

    Thread Starter blindpet

    (@blindpet)

    Confirming it is the transient flush using your plugin’s button that made query monitor pop up and work.

    Plugin Author Till Krüss

    (@tillkruess)

    So you hit the “Flush Object Cache” button on the Redis plugin screen?

    Thread Starter blindpet

    (@blindpet)

    Exactly, doesn’t that call wp cache flush()?

    Plugin Author Till Krüss

    (@tillkruess)

    Yes, that won’t delete transients from the sql db, tho.

    I’ll add that call to the activation process.

    Thanks a lot for you feedback!

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

The topic ‘Not compatible with query monitor’ is closed to new replies.