pantheon-systems / wp-redis

WordPress Object Cache using Redis.
https://wordpress.org/plugins/wp-redis/
GNU General Public License v2.0
226 stars 68 forks source link

Tweak initialization of the $wp_object_cache global #231

Closed partounian closed 5 years ago

danielbachhuber commented 5 years ago

How does this fix the issue?

partounian commented 5 years ago

The original report stated

It looks like the global $wp_object_cache isn't set, aka its null when LudicrousDB tries to get something from the cache.

And then I copied these lines https://github.com/tillkruss/redis-cache/blob/68781b5b4cbd35c7eb2ca22d2d0db66ae57044fc/includes/object-cache.php#L180 as everything else seemed fine, and now it works for me.

Sorry for shoddy explanation, it just works for me :o

danielbachhuber commented 5 years ago

The test failure against WP_VERSION=nightly seems to be because the nightly build ZIP hasn't caught up to the SVN checkout. I'll ship this tomorrow after I get a passing build.

danielbachhuber commented 5 years ago

Just tagged the v0.7.1 release. Thanks again!

kingkool68 commented 5 years ago

Woo thanks for the fix @partounian

Related https://github.com/stuttter/ludicrousdb/issues/62

partounian commented 5 years ago

@kingkool68 thanks for the great issue description, I probably wouldn't have gotten it without you