[wp-trac] [WordPress Trac] #61467: Inconsistent cache handling for network (site) meta

WordPress Trac noreply at wordpress.org
Wed Jul 3 01:03:43 UTC 2024


#61467: Inconsistent cache handling for network (site) meta
-------------------------------------------+-------------------------------
 Reporter:  xParham                        |       Owner:  (none)
     Type:  defect (bug)                   |      Status:  new
 Priority:  normal                         |   Milestone:  Awaiting Review
Component:  Cache API                      |     Version:
 Severity:  major                          |  Resolution:
 Keywords:  has-testing-info dev-feedback  |     Focuses:  multisite,
                                           |  performance
-------------------------------------------+-------------------------------

Comment (by peterwilsoncc):

 I think this should be resolved in WP Core. The problem is that the name
 of the tables used suggest that `get_metadata( 'site', 1, 'siteurl', true
 )` is an appropriate way of getting the option. And the code works as
 expected.

 It also presents a problem that it is possible to add duplicate options to
 the table using code such as `add_metadata( 'site', 1, 'siteurl', '61467'
 )`. Once such code is run, the option returned by `get_site_option()` will
 vary depending on the database engine being used.

 Calls to `update_site_option()` once that happens can behave very
 strangely indeed. In my case `update_site_option( 'siteurl', 'testing' )`
 returned `true` but the second copy of the option was updated to the value
 of the first.

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


More information about the wp-trac mailing list