[wp-trac] [WordPress Trac] #15452: Use wp_cache_add() instead of wp_cache_set() in update_meta_cache()
WordPress Trac
wp-trac at lists.automattic.com
Wed Nov 17 16:46:38 UTC 2010
#15452: Use wp_cache_add() instead of wp_cache_set() in update_meta_cache()
-------------------------+--------------------------------------------------
Reporter: ryan | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.1
Component: Cache | Version: 3.0.1
Severity: normal | Keywords:
-------------------------+--------------------------------------------------
update_meta_cache() already does a wp_cache_get() on each object_id and
excludes those that are already in the cache from further processing.
Later on it does a wp_cache_set(). This can be a wp_cache_add() instead.
Using adds is preferred policy when priming the cache (as opposed to
updating the cache when something is changed, which should use set) and
can improve cache performance in certain scenarios since an add does not
force invalidation.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15452>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list