Ejemplo n.º 1
0
 /**
  * Get the Redis connection instance.
  *
  * @return \Predis\ClientInterface 
  * @static 
  */
 public static function connection()
 {
     return \Illuminate\Cache\RedisStore::connection();
 }
Ejemplo n.º 2
0
 public function __construct(RedisStore $redis)
 {
     $this->redis = $redis;
     $this->client = $redis->connection();
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 protected function doGetStats()
 {
     $stats = $this->store->connection()->info();
     return [Cache::STATS_HITS => isset($stats['keyspace_hits']) ? $stats['keyspace_hits'] : $stats['Stats']['keyspace_hits'], Cache::STATS_MISSES => isset($stats['keyspace_misses']) ? $stats['keyspace_misses'] : $stats['Stats']['keyspace_misses'], Cache::STATS_UPTIME => isset($stats['uptime_in_seconds']) ? $stats['uptime_in_seconds'] : $stats['Server']['uptime_in_seconds'], Cache::STATS_MEMORY_USAGE => isset($stats['used_memory']) ? $stats['used_memory'] : $stats['Memory']['used_memory']];
 }
Ejemplo n.º 4
0
 public function __construct(Cache $cache, RedisStore $redis)
 {
     $this->cache = $cache;
     $this->redis = $redis->connection();
 }