Browse Source

Merge pull request #1731 from dcelasun/master

Add flushing support to the Redis cache driver
Taylor Otwell 12 years ago
parent
commit
158b81974a
1 changed files with 11 additions and 1 deletions
  1. 11 1
      laravel/cache/drivers/redis.php

+ 11 - 1
laravel/cache/drivers/redis.php

@@ -87,5 +87,15 @@ class Redis extends Driver {
 	{
 		$this->redis->del($key);
 	}
+	
+	/**
+	 * Flush the entire cache.
+	 * 
+	 * @return void
+	 */
+	 public function flush()
+	 {
+	 	$this->redis->flushdb();
+	 }
 
-}
+}