Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed undefined constant

  • Loading branch information...
commit 881f81d01abe8ba332a073a9685b020636041afb 1 parent 7056ccd
@davidsteinsland davidsteinsland authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/Cake/Cache/Engine/MemcachedEngine.php
View
6 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 @@ public function init($settings = array()) {
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'),
Please sign in to comment.
Something went wrong with that request. Please try again.