Skip to content

Commit

Permalink
Add note that flush() clears everything
Browse files Browse the repository at this point in the history
Especially irrespective of the prefix.

I just nuked our production redis database (used for Resque)
because of this behavior (I'm calling `php artisan clear:cache`
on every deploy).

See laravel/framework#5034 for "prior art".
  • Loading branch information
mfn committed Sep 3, 2015
1 parent 337f87e commit fd76265
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@ You may remove items from the cache using the `forget` method on the `Cache` fac

Cache::forget('key');

You can also clear the whole caching using the `flush` method:

Cache::flush();

> **Note:** Flushing the cache **will not** respect the prefix and will remove all entries in the cache. Consider this when using e.g. Redis databases which may be shared with other application (Queueing, etc.).
<a name="adding-custom-cache-drivers"></a>
## Adding Custom Cache Drivers

Expand Down

0 comments on commit fd76265

Please sign in to comment.