Search code examples
recursioncachingdirectoryphalcon

Phalcon 4.x creates multiple folders to store cached data. What is the benefit of having recursive and multiple folders?


$hash = '123456789';
$fileName = "test.{$hash}.html";

the final directory structure will be like following.

te/st/.1/23/45/67/test.123456789.html

it simply breaks down the file name in to directories of two characters leaving the last 2 chars from the path test.123456789


Solution

  • To prevent too many files in one folder error. See https://docs.phalcon.io/4.0/en/cache#stream as well.