[wp-trac] [WordPress Trac] #22661: Allow object caches to degrade gracefully
WordPress Trac
noreply at wordpress.org
Wed Feb 21 14:58:16 UTC 2018
#22661: Allow object caches to degrade gracefully
---------------------------------------+-----------------------------
Reporter: markjaquith | Owner: markjaquith
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Future Release
Component: Cache API | Version:
Severity: normal | Resolution: fixed
Keywords: 2nd-opinion needs-testing | Focuses:
---------------------------------------+-----------------------------
Changes (by markjaquith):
* owner: => markjaquith
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"42723"]:
{{{
#!CommitTicketReference repository="" revision="42723"
Cache API: Allow external object caches to gracefully degrade to the
default object cache.
Rework logic for how external object caches are detected, so that if
an external cache does not define a `wp_cache_init()`, the built-in
object cache will be used.
Object caches can now wrap their entire contents in logic checks. So a
Redis caching backend could make sure that the `Redis` PHP class is
available before defining all the caching functions. And if Redis is
not available, the site doesn't break or throw errors or think it is
using caching when it isn't. This is particularly useful for doing
local development, where you might want to develop on a site without
running Memcache or Redis like you are in production.
* Accounts for multisite, which may re-initialize the object cache
multiple times.
* Accounts for object caches that may include `object-cache.php` during
`advanced-cache.php` (before WP loads it).
Props jtsternberg, markjaquith.
Fixes #22661.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/22661#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list