Title: wp_cache_get() not supporting 4th parameter $found
Last modified: August 24, 2016

---

# wp_cache_get() not supporting 4th parameter $found

 *  [Mike Schinkel](https://wordpress.org/support/users/mikeschinkel/)
 * (@mikeschinkel)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/wp_cache_get-not-supporting-4th-parameter-found/)
 * This plugin is not supporting the 4th parameter `$found` that is in WordPress
   core for `wp_cache_get()` thus is it causing breakage in some sites.
 * [https://wordpress.org/plugins/memcached/](https://wordpress.org/plugins/memcached/)

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

 *  [conner_bw](https://wordpress.org/support/users/conner_bw/)
 * (@conner_bw)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/wp_cache_get-not-supporting-4th-parameter-found/#post-6174010)
 * What is this $found variable exactly?
 * I see it was introduced 4 years ago by [@ryan](https://wordpress.org/support/users/ryan/)
   the maintainer of the Memcached Object Cache plugin
 * [https://core.trac.wordpress.org/changeset/20089](https://core.trac.wordpress.org/changeset/20089)
 * What is breaking exactly?
 *  [TENdlee](https://wordpress.org/support/users/tendlee/)
 * (@tendlee)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wp_cache_get-not-supporting-4th-parameter-found/#post-6174013)
 * Our team just discovered this issue too, specifically when using the advanced-
   custom-fields plugin.
 * `$found` is used when there is a possibility that your cache object stores boolean
   values, particularly `false`. If a cache hit from `wp_cache_get()` actually returns
   a value of `false` then you cannot reliably determine a cache hit/miss this way.`
   wp_cache_get()` would return `false` for both a cache hit and miss in this situation.
 * Instead of checking the value of `wp_cache_get()` to determine cache hit/miss,
   you can pass `$found` by reference to determine success. `$found` will return
   true/false for cache hit/miss I believe.
 * I haven’t tested this yet but this fork looks promising: [https://github.com/voceconnect/memcached](https://github.com/voceconnect/memcached).
   It appears to address the issue.
 *  [Duke](https://wordpress.org/support/users/dukessa/)
 * (@dukessa)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wp_cache_get-not-supporting-4th-parameter-found/#post-6174047)
 * We decided to used the forked one.
 * The fact this one hasnt been touched in 2 yrs, considering all the things that
   have changed in the meantime, isnt reassuring.

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

The topic ‘wp_cache_get() not supporting 4th parameter $found’ is closed to new 
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/memcached.svg)
 * [Memcached Object Cache](https://wordpress.org/plugins/memcached/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/memcached/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/memcached/)
 * [Active Topics](https://wordpress.org/support/plugin/memcached/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/memcached/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/memcached/reviews/)

## Tags

 * [found](https://wordpress.org/support/topic-tag/found/)
 * [incompatibility](https://wordpress.org/support/topic-tag/incompatibility/)
 * [wp_cache_get](https://wordpress.org/support/topic-tag/wp_cache_get/)

 * 3 replies
 * 4 participants
 * Last reply from: [Duke](https://wordpress.org/support/users/dukessa/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/wp_cache_get-not-supporting-4th-parameter-found/#post-6174047)
 * Status: not resolved