[wp-trac] [WordPress Trac] #31245: Replace alloptions with a key cache
WordPress Trac
noreply at wordpress.org
Tue Oct 22 03:54:52 UTC 2019
#31245: Replace alloptions with a key cache
-------------------------------------+-----------------------------
Reporter: rmccue | Owner: SergeyBiryukov
Type: enhancement | Status: reviewing
Priority: normal | Milestone: Future Release
Component: Options, Meta APIs | Version: 2.1
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses: performance
-------------------------------------+-----------------------------
Comment (by SergeyBiryukov):
Replying to [comment:81 dd32]:
> (I guess that's also another concern of mine - This change breaking an
existing cache's implementation of alloptions -
[attachment:"31245.3.diff"] won't break the above implementation, but
it'll make it less performant)
One option that comes to mind is implementing [attachment:31245.3.diff]
not in the hardcoded way it is in the patch, but instead hooked to
`added_option`/`updated_option`/`deleted_option`, as demonstrated in
comment:57. That way existing object caches could choose whether to go
with core's `wp_cache_delete( 'alloptions', 'options' )` or unhook it and
keep their own implementation for better performance.
I'm also curious about [attachment:fabian-race-fix.diff], do you have an
opinion on that patch?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31245#comment:82>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list