/**
  * Create a new Memcached store.
  *
  * @param  \Memcached $storage
  * @param  string $prefix
  */
 public function __construct(\Memcached $storage, $prefix = '')
 {
     $this->memcached = $storage;
     parent::__construct($prefix);
 }
Example #2
0
 /**
  * Create a new Memcache store.
  *
  * @param  \Memcache $memcache
  * @param  string $prefix
  */
 public function __construct(\Memcache $memcache, $prefix = '')
 {
     $this->memcache = $memcache;
     parent::__construct($prefix);
 }
 protected function getKey($key)
 {
     $md5 = md5($key);
     return $this->storage->generatekey($this->prefix, $md5);
 }
Example #4
0
 /**
  * Remove all items from the cache.
  *
  * @return void
  */
 public function flush()
 {
     $this->storage->flush();
 }