Viewing 3 replies - 1 through 3 (of 3 total)
  • What is this $found variable exactly?

    I see it was introduced 4 years ago by @ryan the maintainer of the Memcached Object Cache plugin

    https://core.trac.www.ads-software.com/changeset/20089

    What is breaking exactly?

    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. It appears to address the issue.

    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.