We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Cache sub directories

I can specify a cache directory with this code:

$cache = new Phalcon\Cache\Backend\File($frontCache, array(
     "cacheDir" => "../app/cache/"

But, having lots of cache items, it will add lots of files to this directory. So, is it possible to make Phalcon automatically generate sub directories to store the cache files?

What I'm asking is similiar to what Zend 1 does with the "hashed_directory_level" parameter:


Yeah we need to look into that since sooner or later we will end up with the no more files allowed i.e. max files per folder.

Could you please open a NFR in Github so that we can address this?


Please provide a link to github if this was done:-) Thanks