[wp-trac] [WordPress Trac] #15543: _get_last_post_time() uses the incorrect cache key
WordPress Trac
wp-trac at lists.automattic.com
Mon Nov 22 21:36:49 UTC 2010
#15543: _get_last_post_time() uses the incorrect cache key
--------------------------+-------------------------------------------------
Reporter: mdawaffe | Owner: scribu
Type: defect (bug) | Status: accepted
Priority: high | Milestone: 3.1
Component: Cache | Version:
Severity: major | Keywords:
--------------------------+-------------------------------------------------
Comment(by mdawaffe):
Replying to [comment:2 scribu]:
> Is there a way to invalidate the entire 'timeinfo' group?
No. Memcache (and most wp_cache implementations) cannot do this.
There's a way around this, but it's tricky. You keep track of an
incrementor, $i, in the cache and then do cache operations on the group
"timeinfo-$i". To "invalidate" the group, you increment $i using
wp_cache_incr().
Replying to [comment:3 scribu]:
> A compromise would be to use a single cache key for all post types. That
will still probably take care of the original problem.
That would work.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15543#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list