Opened 12 years ago
Last modified 3 months ago
#26402 new defect (bug)
Add option to DB if option is only present in cache when updating option
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Future Release | Priority: | normal |
| Severity: | normal | Version: | 3.8 |
| Component: | Cache API | Keywords: | has-patch needs-unit-tests |
| Focuses: | Cc: |
Description
In very rare circumstances some options may not be in DB but in cache. On update if updating DB fails remove from cache and try to add option. This would eventually fix cache inconsistencies if they occur.
Both update_option and update_site_option are affected.
Attachments (2)
Change History (8)
#2
@
12 years ago
- Keywords has-patch needs-unit-tests added
- Milestone changed from Awaiting Review to 3.9
#3
@
12 years ago
- Milestone changed from 3.9 to Future Release
In very rare circumstances some options may not be in DB but in cache.
Knowing under what circumstances this would occur is really the only good way to fix this.
I understand the desire to wp_cache_delete() in these situations, but I am not sure about the desire to re-add. There is a concern that cache is stale, should just work to clear the cache and let it balance itself out later.
This is lacking unit tests to demonstrate the bug and/or fix, so I'm moving it to future release pending additional feedback.
This ticket was mentioned in PR #9481 on WordPress/wordpress-develop by @abcd95.
3 months ago
#6
- Keywords needs-refresh removed
I agree that these persistent object cache/db inconsistencies are annoying as heck.