Initial commit
This commit is contained in:
24
php/prepend-wp-redis.php
Normal file
24
php/prepend-wp-redis.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* Platform defaults for WordPress Redis Object Cache (Till Krüss redis-cache).
|
||||
* Runs before WordPress loads.
|
||||
*/
|
||||
|
||||
$fmt = 'redis-v1'; // bump to v2 if you change serializer/encoding
|
||||
|
||||
define('WP_REDIS_SCHEME', 'unix');
|
||||
define('WP_REDIS_PATH', '/var/run/redis/redis.sock');
|
||||
define('WP_REDIS_IGBINARY', true);
|
||||
define('WP_REDIS_TIMEOUT', 1.0);
|
||||
define('WP_REDIS_READ_TIMEOUT', 1.0);
|
||||
|
||||
// Optional polish:
|
||||
if (!defined('WP_REDIS_RETRY_INTERVAL')) {
|
||||
define('WP_REDIS_RETRY_INTERVAL', 100);
|
||||
}
|
||||
if (!defined('WP_CACHE_KEY_SALT')) {
|
||||
define('WP_CACHE_KEY_SALT', $fmt . ':');
|
||||
}
|
||||
|
||||
// Migration-safe: always enforce namespace
|
||||
define('WP_REDIS_PREFIX', $fmt . ':');
|
||||
Reference in New Issue
Block a user