[wp-trac] [WordPress Trac] #61484: Prime notoptions within `delete_option()`, `delete_network_option()`.
WordPress Trac
noreply at wordpress.org
Tue Jul 23 00:25:34 UTC 2024
#61484: Prime notoptions within `delete_option()`, `delete_network_option()`.
--------------------------------------+--------------------------
Reporter: peterwilsoncc | Owner: pbearne
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.7
Component: Options, Meta APIs | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses: performance
--------------------------------------+--------------------------
Changes (by peterwilsoncc):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"58782" 58782]:
{{{
#!CommitTicketReference repository="" revision="58782"
Options, Meta APIs: Prime `notoptions` cache when deleting options.
Prime the `notoptions` cache within `delete_option` and
`delete_network_option` to avoid the need for a database query if
`get_option` or `get_network_option` is subsequently called.
Adds some associated tests to ensure that an option is cleared from the
notoptions cache when an option is added either via `add_option`,
`update_option` or their network option equivalent.
Props pbearne, mukesh27.
Fixes #61484.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61484#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list