doctrine/cache — pull request #16 by nesQuick (2013-07-04 15:31:59+00:00)
Title: FilesystemCache should not use that many directories

... in order to have a manageable amount of items per directory. [See this blog post.](http://michaelandrews.typepad.com/the_technical_times/2009/10/creating-a-hashed-directory-structure.html)

When splitting the hash into four pieces, each containing 16 chars, with each 16 possible values this can lead to 16^16 (1.84467441e19) folders at each level. This might lead to an amount which goes far beyond filesystem limits. Even if a filesystem could handle that many items/folders, "stat operations such as listing files, following paths, or checking for the existence of a file" will be super slow!