stuttter / wp-spider-cache

Your friendly neighborhood caching solution for WordPress
GNU General Public License v2.0
134 stars 16 forks source link

Strange keys, undefined index #27

Open ihorvorotnov opened 7 years ago

ihorvorotnov commented 7 years ago

Trying the plugin out, keep getting some odd behavior. The plugin was installed via composer (5.0.0), copied drop-ins, activated the plugin. At first, it didn't show any results on the admin page, although a number of SQL queries dropped, indicating the object cache is working. Installed php-memcache extension (by default, Laravel's Homestead box includes only php-memcached), now there are some keys, but they don't look real:

screen shot 2017-08-11 at 12 08 25

The value of all keys is the same and equals -1.

Also, I'm getting this notice dumped multiple times to debug.log:

[11-Aug-2017 09:01:59 UTC] PHP Notice:  Undefined offset: 1 in /home/vagrant/Code/ihorvorotnov/app/plugins/wp-spider-cache/wp-spider-cache.php on line 787
[11-Aug-2017 09:01:59 UTC] PHP Stack trace:
[11-Aug-2017 09:01:59 UTC] PHP   1. {main}() /home/vagrant/Code/ihorvorotnov/core/wp-admin/admin-ajax.php:0
[11-Aug-2017 09:01:59 UTC] PHP   2. do_action() /home/vagrant/Code/ihorvorotnov/core/wp-admin/admin-ajax.php:91
[11-Aug-2017 09:01:59 UTC] PHP   3. WP_Hook->do_action() /home/vagrant/Code/ihorvorotnov/core/wp-includes/plugin.php:453
[11-Aug-2017 09:01:59 UTC] PHP   4. WP_Hook->apply_filters() /home/vagrant/Code/ihorvorotnov/core/wp-includes/class-wp-hook.php:323
[11-Aug-2017 09:01:59 UTC] PHP   5. WP_Spider_Cache_UI->ajax_get_instance() /home/vagrant/Code/ihorvorotnov/core/wp-includes/class-wp-hook.php:298
[11-Aug-2017 09:01:59 UTC] PHP   6. WP_Spider_Cache_UI->do_rows() /home/vagrant/Code/ihorvorotnov/app/plugins/wp-spider-cache/wp-spider-cache.php:370
[11-Aug-2017 09:01:59 UTC] PHP   7. WP_Spider_Cache_UI->get_keymaps() /home/vagrant/Code/ihorvorotnov/app/plugins/wp-spider-cache/wp-spider-cache.php:1047

Line 787 is a multisite related check. The site is not multisite though.

My environment:

Some other plugins are installed - mostly dev related (Query Monitor, Laps etc). Deactivating them doesn't fix the problem.