Exemple #1
0
 public function __construct(array $settings)
 {
     parent::__construct($settings['namespace']);
     $this->cache_dir = $settings['cacheDir'];
     if (!is_dir($this->cache_dir)) {
         mkdir($this->cache_dir);
     }
 }
Exemple #2
0
 public function __construct($cacheDir, $namespace)
 {
     parent::__construct($namespace);
     $this->cache_dir = $cacheDir;
     if (!is_dir($this->cache_dir)) {
         mkdir($this->cache_dir);
     }
 }
Exemple #3
0
 /**
  * Decrement the value of an item in the cache.
  *
  * @param  string  $key
  * @param  mixed   $value
  * @return void
  */
 public function decrement($key, $value = 1)
 {
     $key = parent::getNsKey($key);
     return $this->link->decrby($key, $value);
 }