You are here

protected function RedisCache::getSerializerValue in Plug 7

Returns the serializer constant to use. If Redis is compiled with igbinary support, that is used. Otherwise the default PHP serializer is used.

Return value

integer One of the Redis::SERIALIZER_* constants

1 call to RedisCache::getSerializerValue()
RedisCache::setRedis in lib/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php
Sets the redis instance to use.

File

lib/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php, line 143

Class

RedisCache
Redis cache provider.

Namespace

Doctrine\Common\Cache

Code

protected function getSerializerValue() {
  if (defined('HHVM_VERSION')) {
    return Redis::SERIALIZER_PHP;
  }
  return defined('Redis::SERIALIZER_IGBINARY') ? Redis::SERIALIZER_IGBINARY : Redis::SERIALIZER_PHP;
}