Opened 19 years ago
Closed 19 years ago
#4743 closed defect (bug) (fixed)
Fix cache stomping in get_bookmarks()
| Reported by: | josephscott | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.3 |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
The cache in get_bookmarks() can stomp on itself, resulting in cache misses even after adding it to the cache.
I'm including a patch that breaks the cache up based on the value of $category.
Attachments (1)
Change History (5)
#3
@
19 years ago
- Cc added
After looking at this further the diff has problems and really isn't needed.
My initial thought was that the cache was getting stomped because it wasn't breaking it out into enough different groups. This was true, but not really the issue.
The problem is using wp_cache_add, which is fine if you are storing one "thing", but we have an array of things that change. So we should be using wp_cache_set.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Stomping because of high concurrency of cache adds?