[wp-trac] [WordPress Trac] #31245: Replace alloptions with a key cache

WordPress Trac noreply at wordpress.org
Wed Nov 20 12:46:17 UTC 2019


#31245: Replace alloptions with a key cache
-------------------------------------+--------------------------
 Reporter:  rmccue                   |       Owner:  tellyworth
     Type:  enhancement              |      Status:  reviewing
 Priority:  normal                   |   Milestone:  5.4
Component:  Options, Meta APIs       |     Version:  2.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  performance
-------------------------------------+--------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:89 tellyworth]:
 > Are the two patches intended to be used together, or are they mutually
 exclusive?

 Not mutually exclusive, but I think [attachment:"31245.4.diff"] might no
 longer be necessary if [attachment:"31245.5.fabian-race-fix.diff"] manages
 to fix most manifestations of the issue without the side effects of a
 sudden DB load increase after clearing the cache, or reducing performance
 of existing caches' implementations, per comment:81 and comment:83.

 > Also, it looks like the race-fix patches probably have no effect on a
 base install, since the `$force` parameter to `WP_Object_Cache::get()` is
 unused. Is that intended?

 Yes, in my testing using the steps from comment:19 (with Redis instead of
 Memcached), the base install appears to be unaffected, the issue only
 occurs when using persistent cache, which does handle the `$force`
 parameter.

 The testing also revealed that `$force_cache` should be set not only in
 `update_option()`, but also in `add_option()` and `delete_option()`. This
 was missed in the previous refresh, and is now done in
 [attachment:"31245.5.fabian-race-fix.diff"].

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/31245#comment:90>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list