Skip to content
Snippets Groups Projects
Commit 7d1506cc authored by Luke Woodward's avatar Luke Woodward
Browse files

Use the redis PHP serializer by default

parent 423e8986
No related branches found
No related tags found
Loading
......@@ -326,11 +326,17 @@ class WP_Object_Cache {
if ( defined( 'WP_REDIS_BACKEND_DB' ) && WP_REDIS_BACKEND_DB ) {
$redis['database'] = WP_REDIS_BACKEND_DB;
}
if ( ( defined( 'WP_REDIS_SERIALIZER' ) ) ) {
$redis['serializer'] = WP_REDIS_SERIALIZER;
} else {
$redis['serializer'] = Redis::SERIALIZER_PHP;
}
// Use Redis PECL library.
try {
$this->redis = new Redis();
$this->redis->connect( $redis['host'], $redis['port'] );
$this->redis->setOption( Redis::OPT_SERIALIZER, $redis['serializer'] );
if ( isset( $redis['auth'] ) ) {
$this->redis->auth( $redis['auth'] );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment