From 31e21971a0fbaad823c7cb7247f71446a7b3b595 Mon Sep 17 00:00:00 2001 From: Duru Can Celasun Date: Wed, 20 Feb 2013 09:17:59 +0200 Subject: [PATCH] Add flushing support to the Redis cache driver --- laravel/cache/drivers/redis.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/laravel/cache/drivers/redis.php b/laravel/cache/drivers/redis.php index 3195566c..f0a71d07 100644 --- a/laravel/cache/drivers/redis.php +++ b/laravel/cache/drivers/redis.php @@ -87,5 +87,15 @@ public function forget($key) { $this->redis->del($key); } + + /** + * Flush the entire cache. + * + * @return void + */ + public function flush() + { + $this->redis->flushdb(); + } -} \ No newline at end of file +}