Opened 11 years ago
Last modified 8 years ago
#26402 new defect (bug)
Add option to DB if option is only present in cache when updating option
Reported by: | codix | Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 3.8 |
Component: | Cache API | Keywords: | has-patch needs-unit-tests needs-refresh |
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 (7)
#2
@
11 years ago
- Keywords has-patch needs-unit-tests added
- Milestone changed from Awaiting Review to 3.9
#3
@
11 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.
I agree that these persistent object cache/db inconsistencies are annoying as heck.