Permalink
Browse files

Add support for Amazon ElastiCache

  • Loading branch information...
1 parent 2b20ddc commit c7dacb05e70fe14472663535e5734872a795daa4 @wa0x6e wa0x6e committed Aug 27, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/Cake/Cache/Engine/MemcachedEngine.php
@@ -117,6 +117,11 @@ protected function _setOptions() {
$this->_Memcached->setOption(Memcached::OPT_SERIALIZER, Memcached::SERIALIZER_IGBINARY);
}
+ // Check for Amazon ElastiCache instance
+ if (defined('Memcached::OPT_CLIENT_MODE') && defined('Memcached::DYNAMIC_CLIENT_MODE')) {
+ $this->_Memcached->setOption(Memcached::OPT_CLIENT_MODE, Memcached::DYNAMIC_CLIENT_MODE);
+ }
+
$this->_Memcached->setOption(Memcached::OPT_COMPRESSION, (bool)$this->settings['compress']);
}

0 comments on commit c7dacb0

Please sign in to comment.