protected function getRedis()
 {
     $cw = new CompressionWrapper(new PhpIRedisClient('someCircle'));
     $cw->setMinCompressionLength(20);
     return $cw;
 }
Example #2
0
 /**
  * @param Connection $conn
  * @param array $config
  * @return CompressionWrapper
  */
 private function wrapInCompression(Connection $conn, array $config)
 {
     $wrapper = new CompressionWrapper($conn);
     if (isset($config['minCompressionLength'])) {
         $wrapper->setMinCompressionLength((int) $config['minCompressionLength']);
     }
     return $wrapper;
 }