From 881f81d01abe8ba332a073a9685b020636041afb Mon Sep 17 00:00:00 2001 From: davidsteinsland Date: Tue, 19 Nov 2013 11:50:28 +0100 Subject: [PATCH] Fixed undefined constant --- lib/Cake/Cache/Engine/MemcachedEngine.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Cache/Engine/MemcachedEngine.php b/lib/Cake/Cache/Engine/MemcachedEngine.php index 264f76f2d..9c50186fe 100755 --- a/lib/Cake/Cache/Engine/MemcachedEngine.php +++ b/lib/Cake/Cache/Engine/MemcachedEngine.php @@ -60,7 +60,6 @@ class MemcachedEngine extends CacheEngine { protected $_serializers = array( 'igbinary' => Memcached::SERIALIZER_IGBINARY, 'json' => Memcached::SERIALIZER_JSON, - 'msgpack' => Memcached::SERIALIZER_MSGPACK, 'php' => Memcached::SERIALIZER_PHP ); @@ -81,6 +80,11 @@ class MemcachedEngine extends CacheEngine { if (!isset($settings['prefix'])) { $settings['prefix'] = Inflector::slug(APP_DIR) . '_'; } + + if (defined('Memcached::HAVE_MSGPACK') && Memcached::HAVE_MSGPACK) { + $this->_serializers['msgpack'] = Memcached::SERIALIZER_MSGPACK; + } + $settings += array( 'engine' => 'Memcached', 'servers' => array('127.0.0.1'),