Last active
November 26, 2025 22:10
-
-
Save soderlind/c0e00966caaabb3c31dac83609532011 to your computer and use it in GitHub Desktop.
Object Cache Pro config for Azure Managed Redis (enterpriseCluster)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $redis_config = [ | |
| 'token' => '••••••••', | |
| 'host' => 'tls://MY-REDIS.norwayeast.redis.azure.net', // enterpriseCluster = host mode | |
| 'port' => '10000', | |
| 'username' => 'default', | |
| 'password' => '••••••••', | |
| 'database' => 0, | |
| 'client' => 'phpredis', | |
| 'serializer' => 'igbinary', | |
| 'compression' => 'zstd', | |
| 'log_levels' => [ | |
| 'error', | |
| 'critical', | |
| ], | |
| 'persistent' => true, | |
| 'non_persistent_groups' => [ | |
| 'wc_session_id', | |
| '*-queries', | |
| ], | |
| 'timeout' => 1.25, | |
| 'read_timeout' => 2.5, | |
| 'retry_interval' => 100, | |
| 'retries' => 5, | |
| 'backoff' => 'smart', | |
| 'prefetch' => true, | |
| 'non_prefetchable_groups'=> [ | |
| 'wc_session_id', | |
| '*-queries', | |
| ], | |
| 'split_alloptions' => true, | |
| 'async_flush' => true, | |
| 'shared' => true, | |
| 'prefix' => 'pwp_', | |
| 'save_commands' => false, | |
| 'maxttl' => 86400, | |
| 'queryttl' => 3600, | |
| 'analytics' => [ | |
| 'enabled' => true, | |
| 'persist' => false, | |
| 'retention' => 3600, | |
| 'sample_rate' => 100, | |
| ], | |
| 'debug' => false, | |
| ]; | |
| define( 'WP_REDIS_CONFIG', $redis_config ); | |
| define( 'WP_REDIS_DISABLED', false ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment