Closed JDGrimes closed 8 years ago
I tried just overriding the $wp_object_cache->cache
property. Even though it is private, WP_Object_Cache
allows access via __get()
for back-compat. However, it isn't possible to replace that array with a black-hole ArrayAccess
object, because of issues with indirect modification:
[PHPUnit_Framework_Exception] Indirect modification of overloaded element...
So I guess we'll have to replace the whole $wp_object_cache
global.
We have thought that we were doing this with
wp_suspend_cache_addition()
, however, that function only suspends the use ofwp_cache_add()
, notwp_cache_set()
. To entirely suspend caching, I think we'd have to override the built-in object cache in some way.