Пример #1
0
 /**
  * Prepare instance
  *
  * @param \Redis $redis
  * @param int $ttl
  * @param bool|false $cachePrefix
  */
 public function __construct(\Redis $redis, $ttl = 3600, $cachePrefix = false)
 {
     parent::__construct($ttl, $cachePrefix);
     $this->redis = $redis;
 }
 /**
  * Prepare instance
  * 
  * @param Memcached $memcached
  */
 public function __construct(\Memcached $memcached, $ttl = 3600, $cachePrefix = false)
 {
     parent::__construct($ttl, $cachePrefix);
     $this->memcached = $memcached;
 }
Пример #3
0
 /**
  * Configure instance
  * 
  * @param Integer $ttl          How long should circuit breaker data persist (between updates)
  * @param String  $cachePrefix  Value has to be string. If empty default cache key prefix is used.
  */
 public function __construct($ttl = 3600, $cachePrefix = false)
 {
     parent::__construct($ttl, $cachePrefix);
 }