[wp-trac] [WordPress Trac] #56845: Multisite option caching breaks for sites with bigger options

WordPress Trac noreply at wordpress.org
Tue Oct 18 14:36:54 UTC 2022


#56845: Multisite option caching breaks for sites with bigger options
--------------------------------+-----------------------------
 Reporter:  pavelschoffer       |      Owner:  (none)
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Options, Meta APIs  |    Version:  trunk
 Severity:  critical            |   Keywords:
  Focuses:                      |
--------------------------------+-----------------------------
 This change (https://core.trac.wordpress.org/ticket/37181) changed the way
 multisite options are retrieved and cached in trunk (to be released in
 6.1.).

 The old code used to put to cache each requested site meta (=network
 option) separately under a key: `<network_id>:<option_key>` so for example
 `1:site_name`.

 The new code fetches all the options for the given network_id (not just
 the one you are asking for) and saves the whole set of them under one key
 `:site_meta:<network_id>` so `:site_meta:1`. Where the value in the cache
 would be:

 ```
 {
    "site_name": '...',
    "option2", '...',
    ...
 }
 ```

 The outcome of this change is that if the cumulative size of ALL site
 options is bigger than 1MB (default limit of memcached per object) NONE of
 the options will be cached.

 Would it be possible to revert the change and/or make the cache key per-
 site versus per-site-and-option-key optional?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56845>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list