Example #1
1
 /**
  * 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;
 }
Example #2
0
 /**
  * {@inheritdoc}
  *
  * @return \Orno\Cache\Adapter\RedisAdapter
  */
 public function flush()
 {
     $this->redis->flushall();
     return $this;
 }
Example #3
0
 public function tearDown()
 {
     $this->client->flushall();
 }
Example #4
0
 /**
  * remove all
  *
  * @return bool
  */
 public function removeAll()
 {
     return $this->client->flushall();
 }
Example #5
0
 protected function tearDown()
 {
     $client = new Client();
     $client->flushall();
 }
Example #6
0
 /**
  * @BeforeScenario
  */
 public function flushRedis()
 {
     $this->redis->flushall();
 }