Skip to content
This repository has been archived by the owner on Feb 23, 2019. It is now read-only.

Fix for Object Cache 'Get' method incorrectly setting cache value #439

Merged
merged 2 commits into from
Mar 15, 2017

Conversation

charlesLF
Copy link
Collaborator

This PR is for issue #438 wherein wp_cache_get shows $found to be true even it is directly preceded by awp_cache_delete.

The issue lies in the get function in ObjectCache_WpObjectCache_Regular.php , which always sets a value for the cache object's key, even if a hit was not found.

The proposed fix is to only set $this->cache[$key] = $value; if $value !== false

@nigrosimone
Copy link
Collaborator

Thanks @charlesLF!

@nigrosimone nigrosimone reopened this Mar 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants