[wp-trac] [WordPress Trac] #14485: Didn't show up children category when created parent and children categories at the same time.
WordPress Trac
wp-trac at lists.automattic.com
Sat Dec 11 08:10:11 UTC 2010
#14485: Didn't show up children category when created parent and children
categories at the same time.
--------------------------+-------------------------------------------------
Reporter: thealien | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 3.1
Component: Cache | Version: 3.0
Severity: normal | Keywords: has-patch needs-testing
--------------------------+-------------------------------------------------
Comment(by garyc40):
Replying to [comment:14 scribu]:
> Ok, but then how do you invalidate {{{"get_terms:$key:$last_changed"}}}
?
I also don't see cache invalidation for get_terms anywhere, so that's
something I'm thinking about right now. If there's a way to invalidate
get_terms cache, then there's no need for $last_changed.
Actually, attaching $last_changed to the cache key is still flawed, even
when I include other factors such as post ids in it. Imagine this: a term
gets created, then modified or deleted all in the same page load. The upon
deletion, the value of $last_changed is still $ids:$time . However
there's almost no chance of something like that happening.
What I have in mind right now, is rewriting the cache API to provide a
"wp_cache_delete_group()" which wipes out cached values of a whole group.
Whenever something gets updated, we can just call wp_cache_delete_group(
"terms" ); This would eliminate the need to attach $last_changed to the
cache key.
What do you think?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14485#comment:17>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list