コード例 #1
1
ファイル: Clear.php プロジェクト: eveseat/console
 /**
  * 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;
 }
コード例 #2
0
ファイル: RedisAdapter.php プロジェクト: orno/cache
 /**
  * {@inheritdoc}
  *
  * @return \Orno\Cache\Adapter\RedisAdapter
  */
 public function flush()
 {
     $this->redis->flushall();
     return $this;
 }
コード例 #3
0
ファイル: RedisHandlerTest.php プロジェクト: wandu/framework
 public function tearDown()
 {
     $this->client->flushall();
 }
コード例 #4
0
ファイル: AdapterPredis.php プロジェクト: voku/simple-cache
 /**
  * remove all
  *
  * @return bool
  */
 public function removeAll()
 {
     return $this->client->flushall();
 }
コード例 #5
0
ファイル: CronLockTest.php プロジェクト: loganhenson/cronlock
 protected function tearDown()
 {
     $client = new Client();
     $client->flushall();
 }
コード例 #6
0
ファイル: BaseContext.php プロジェクト: tystr/redis-orm
 /**
  * @BeforeScenario
  */
 public function flushRedis()
 {
     $this->redis->flushall();
 }