original_string: 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());
  
          }
  
      }
code: 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());
  
          }
  
      }
code_tokens: 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 ( ) ) ; } }
docstring: Flush all keys in Redis.
docstring_tokens: Flush all keys in Redis .