Пример #1
0
 /**
  * Remove an item from the cache.
  *
  * @param mixed $key
  */
 public function forget($key)
 {
     if (is_array($key)) {
         return $this->forgetMulti($key);
     }
     return parent::forget($key);
 }
Пример #2
0
 /**
  * Retrieves cached information from the data store.
  * @since 2.2
  * @return array|null An associative array with server's statistics if available, NULL otherwise.
  */
 protected function doGetStats()
 {
     $stats = $this->store->getMemcached()->getStats();
     $servers = $this->store->getMemcached()->getServerList();
     $key = $servers[0]['host'] . ':' . $servers[0]['port'];
     $stats = $stats[$key];
     return [Cache::STATS_HITS => $stats['get_hits'], Cache::STATS_MISSES => $stats['get_misses'], Cache::STATS_UPTIME => $stats['uptime'], Cache::STATS_MEMORY_USAGE => $stats['bytes'], Cache::STATS_MEMORY_AVAILABLE => $stats['limit_maxbytes']];
 }
 /**
  * MemcachedBucketStore constructor.
  *
  * @param \Memcached $memcached
  * @param string     $prefix
  * @param array      $servers
  */
 public function __construct($memcached, $prefix = '', array $servers)
 {
     parent::__construct($memcached, $prefix);
     $this->servers = $servers;
 }
 /**
  * Begin executing a new tags operation.
  *
  * @param array|mixed $names
  * @return \Illuminate\Cache\TaggedCache 
  * @static 
  */
 public static function tags($names)
 {
     //Method inherited from \Illuminate\Cache\TaggableStore
     return \Illuminate\Cache\MemcachedStore::tags($names);
 }
Пример #5
0
 /**
  * Set the cache key prefix.
  *
  * @param string $prefix
  * @return void 
  * @static 
  */
 public static function setPrefix($prefix)
 {
     \Illuminate\Cache\MemcachedStore::setPrefix($prefix);
 }