[wp-trac] [WordPress Trac] #39034: WP_Site_Query->get_sites() constructs an invalid key...
WordPress Trac
noreply at wordpress.org
Fri Dec 2 20:54:08 UTC 2016
#39034: WP_Site_Query->get_sites() constructs an invalid key...
--------------------------------+-----------------------------
Reporter: seanosh | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Networks and Sites | Version: trunk
Severity: normal | Keywords:
Focuses: multisite |
--------------------------------+-----------------------------
From `class-wp-site-query.php` starting on line 247 (checked in trunk,
4.6.1):
{{{#!php
$key = md5( serialize( wp_array_slice_assoc( $this->query_vars,
array_keys( $this->query_var_defaults ) ) ) );
$last_changed = wp_cache_get_last_changed( 'sites' );
$cache_key = "get_sites:$key:$last_changed";
$cache_value = wp_cache_get( $cache_key, 'sites' );
}}}
The resulting `$cache_key` is something like:
`get_sites:cb4b246a2a9b16dca39a573cce210c10:0.89962600 1480710961`
For installs that use the memcache/memcached object-cache drop-in (and
possibly others), the resulting `wp_cache_get` always returns `false`
since a memcached key "... must not include control characters or
whitespace." (per
[https://github.com/memcached/memcached/blob/master/doc/protocol.txt
memcached protocol])
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39034>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list