Created
December 16, 2013 03:23
-
-
Save gormus/7981855 to your computer and use it in GitHub Desktop.
Redis cache settings for Drupal 7 on Pantheon.
This file contains 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 cache settings for Pantheon. | |
* | |
* http://helpdesk.getpantheon.com/customer/portal/articles/401317 | |
* | |
* All Pantheon Environments. | |
*/ | |
if (defined('PANTHEON_ENVIRONMENT')) { | |
// Use Redis for caching. (mandatory). | |
$conf['redis_client_interface'] = 'PhpRedis'; | |
$conf['cache_backends'][] = 'sites/all/modules/contrib/redis/redis.autoload.inc'; | |
$conf['cache_default_class'] = 'Redis_Cache'; | |
$conf['cache_prefix'] = array( | |
'default' => 'pantheon-redis-' . $_SERVER['PANTHEON_ENVIRONMENT'], | |
); | |
// Do not use Redis for cache_form (no performance difference). | |
$conf['cache_class_cache_form'] = 'DrupalDatabaseCache'; | |
// Only enable one of the options below: | |
// Option A: | |
// High performance - no hook_boot(), no hook_exit(), ignores Drupal IP blacklists. | |
// $conf['page_cache_without_database'] = TRUE; | |
// $conf['page_cache_invoke_hooks'] = FALSE; | |
// // Explicitly set page_cache_maximum_age as database won't be available. | |
// $conf['page_cache_maximum_age'] = 900; | |
// Option B: | |
// Use the database for cached HTML. | |
$conf['cache_class_cache_page'] = 'DrupalDatabaseCache'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment