Opened 14 years ago
Closed 14 years ago
#15452 closed enhancement (fixed)
Use wp_cache_add() instead of wp_cache_set() in update_meta_cache()
Reported by: | ryan | Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | normal | Version: | 3.0.1 |
Component: | Cache API | Keywords: | |
Focuses: | Cc: |
Description
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.
Change History (2)
Note: See
TracTickets for help on using
tickets.
Related: #14817