[bug] .gitignore on the view/query cache list

I am getting .gitignore file on the list in /storage/cache/view and other cache directories.

In case of queries this file is removed, but it is important to keep it in Git repository.

I think it is a bug and there should be some kind of list of files to ignore!

use a .gitignore in your root directory

To keep some directory in Git we need to store some file there:

  • .gitkeep
  • or .gitignore
  • or .dummy

There is key pattern in Zend Framework cache: https://github.com/zendframework/zend-cache/blob/41ff4d4df08bd971cd916d4fa4ec5dff90a4a6f5/src/Storage/Adapter/FilesystemOptions.php#L70

I think we should add something like that to Phalcon Framework: forbid treeting all files starting with dot (.) to be treated as cache file.