[wp-trac] [WordPress Trac] #4476: Delete Cache by Group
WordPress Trac
noreply at wordpress.org
Sat May 13 14:22:19 UTC 2017
#4476: Delete Cache by Group
-----------------------------+-----------------------
Reporter: filosofo | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone:
Component: Cache API | Version: 2.2
Severity: normal | Resolution:
Keywords: has-patch close | Focuses:
-----------------------------+-----------------------
Changes (by Ste_95):
* status: closed => reopened
* resolution: wontfix =>
Comment:
Why hasn't this received any more attention? I still think it's relevant.
The invalidation method posted by @scribu is good with memcached, but not
if cached data goes to the database as a transient:
It is important to note that if you are not careful about how you are
using this design pattern, you could accidentally consume all of your
cache storage space. This strategy relies on changing the key that is used
to access the cached object; it never removes the previously cached
versions of the objects. It leaves it in the cache's storage. If your
caching backend relies on a caching technology that does not automatically
handle cache evictions, you may completely fill that storage. I tend to
work with memcached on large projects that need efficient caching.
Memcached implements an aggressive (sometimes way too aggressive) eviction
policy whereby cached objects are frequently removed from cache. You can
change the keys for the cached objects and the older objects will be
removed from the cache, making room for newer versions of the objects. As
such, the incrementor invalidation strategy is an effective tool in a
memcached environment.
[https://www.tollmanz.com/invalidation-schemes/]
Why not implement the patch from @filosofo. Or at least provide a method
to access the $cache class var, so that we could iterate through the
category array and manually delete each key.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/4476#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list