laravel/framework — pull request #531 by bencorlett (2013-03-08 01:39:30+00:00)
Title: Making Cache::flush() on a Filesystem store not remove dotfiles. Fixes #526

Hi,

When calling Cache::flush() on a default installation of L4 using the Filesystem cache driver, the .gitignore supplied is removed. Kinda annoying, right?

I just switched the method so that we loop through all files and delete them (basically what the `Filesystem::cleanDirectory()` did, but we use `glob()` for this method and this doesn't return dotfiles.

The other alternative was to add options for `cleanDirectory()` but that may cause unexpected behaviour. Happy to switch to make `cleanDirectory()` and `delete()` work as expected with dotfiles if the general consensus leans that way.

Signed-off-by: Ben Corlett