/** * Get the Redis connection instance. * * @return \Predis\ClientInterface * @static */ public static function connection() { return \Illuminate\Cache\RedisStore::connection(); }
public function __construct(RedisStore $redis) { $this->redis = $redis; $this->client = $redis->connection(); }
/** * {@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']]; }
public function __construct(Cache $cache, RedisStore $redis) { $this->cache = $cache; $this->redis = $redis->connection(); }