/** * Flush all keys in Redis */ public function clear_redis_cache() { $redis_host = config('database.redis.default.host'); $redis_port = config('database.redis.default.port'); $this->info('Clearing the Redis Cache at: ' . $redis_host . ':' . $redis_port); try { $redis = new Client(['host' => $redis_host, 'port' => $redis_port]); $redis->flushall(); $redis->disconnect(); } catch (Exception $e) { $this->error('Failed to clear the Redis Cache. Error: ' . $e->getMessage()); } return; }
/** * {@inheritdoc} * * @return \Orno\Cache\Adapter\RedisAdapter */ public function flush() { $this->redis->flushall(); return $this; }
public function tearDown() { $this->client->flushall(); }
/** * remove all * * @return bool */ public function removeAll() { return $this->client->flushall(); }
protected function tearDown() { $client = new Client(); $client->flushall(); }
/** * @BeforeScenario */ public function flushRedis() { $this->redis->flushall(); }