[wp-trac] [WordPress Trac] #55999: wp_suspend_cache_addition should also disable cache setting?
WordPress Trac
noreply at wordpress.org
Fri Jun 17 09:30:15 UTC 2022
#55999: wp_suspend_cache_addition should also disable cache setting?
--------------------------+-----------------------------
Reporter: malthert | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cache API | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Right now wp_suspend_cache_addition is only checked when "add" to cache.
However most plugins/developers only use wp_cache_set for updating/adding
to the cache.
This means in most plugins/cases, wp_suspend_cache_addition has no use, in
fact it's rather unexpected behavior that only some functions can add to
cache (namely: set, incr, decr)
I propose we also check wp_suspend_cache_addition before setting the
cache.
This would also be in line with its function description:
>Stops more data being added to the cache, but still allows cache
retrieval.
As "set" also "adds" (or at least modifies if already exists therefore
adds/subtracts) data in cache.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55999>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list