-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$found parameter to wp_cache_get() is incorrect when object is in local cache in a non-persistent group #61
Comments
… to rely upon the `$found` flag that's not available in all object caches. This fixes job query caching when running on a persistent cache which doesn't implement the `$found` parameter or doesn't consider in-memory caches as "found" (see Automattic/wp-memcached#61).
Added failing test for this here if it helps: #62 |
It's an interesting one, because the value is set in memory cache but non in memcache. So as mad as it sounds there is some logic in |
Correct, that was a side effect of a deliberate choice of #43 - I think https://github.com/Automattic/wp-memcached/blob/master/object-cache.php#L512 just needs |
On the back of #40 & #43 that changed the behaviour of the
$found
parameter to reflect the status of the data in memcache, however, it breaks a different-but-similar case: non-persistent groups.For example:
In this case, the value was never going to exist within memcache and it was found in the cache, so I would argue that
$found
should be true in this case.I personally ran into this with Cavalcade, where it relies upon the
$found
parameter working with non-persistent groups: https://github.com/humanmade/Cavalcade/blob/master/inc/class-job.php#L366-L368The text was updated successfully, but these errors were encountered: