Opened 14 years ago
Closed 14 years ago
#14817 closed defect (bug) (invalid)
update_post_cache() fails when an object is already in the cache
Reported by: | misterbisson | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
The function uses wp_cache_add(), which cannot replace an existing object for the cache key. Should use wp_cache_set(), which happily replaces existing objects or inserts new ones.
Attached patch fixes.
Attachments (1)
Change History (5)
#3
@
14 years ago
Despite the name, the update_cache functions aren't meant to update things already in the cache. They are cache primers and typically use add. If some place is using update_post_cache() to update cache values that needs to be fixed.
#4
@
14 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
Looks like every place in core is using this function correctly (to prime).
Closing as invalid. Please reopen with more details if you find somewhere where the function is being used improperly.
Note: See
TracTickets for help on using
tickets.
Related: #15452