Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save namncn/db9e1be2b27087a3c42bff33429b3db2 to your computer and use it in GitHub Desktop.

Select an option

Save namncn/db9e1be2b27087a3c42bff33429b3db2 to your computer and use it in GitHub Desktop.
Redis Object Cache Pro - Recommended Configuration
define('WP_REDIS_CONFIG', [
'token' => 'e279430effe043b8c17d3f3c751c4c0846bc70c97f0eaaea766b4079001c',
'host' => '127.0.0.1',
'port' => 6379,
'database' => 1, // change for each site
'timeout' => 0.5,
'read_timeout' => 0.5,
'retry_interval' => 10,
'maxttl' => 3600 * 24,
'retries' => 3,
'backoff' => 'smart',
'compression' => 'zstd', // `zstd` compresses smaller, `lz4` compresses faster
'serializer' => 'igbinary',
'async_flush' => true,
'split_alloptions' => true,
'prefetch' => true,
'shared' => true,
'strict' => true,
'debug' => false,
'save_commands' => false,
]);
define('WP_REDIS_DISABLED', getenv('WP_REDIS_DISABLED') ?: false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment