[wp-trac] [WordPress Trac] #31618: Filter wp_cache_get return
WordPress Trac
noreply at wordpress.org
Fri Mar 13 11:56:18 UTC 2015
#31618: Filter wp_cache_get return
-------------------------+------------------------------
Reporter: mattkeys | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cache API | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by mattkeys):
my situation was a function in a 3rd party plugin which would return early
if cached data was found. I wanted to always return false from the cache
if the user had admin capabilities.
The need for this was that the function in question contains a number of
apply_filters() which never get called if the cache is found and returned.
Having had a full nights sleep on this issue now, it seems the better
solution is to contact that plugin author and request that their code is
refactored to always fire the filters, even on cached results. And not try
to tackle this issue with a filter on wp_cache_get like I outlined in this
ticket; unless someone else has a use-case that is valid.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31618#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list