Poor performance with a large number of items


You will get poor performance with a large number of items in the cache, due to using a single flat folder. It would be better to create a 2 level deep tree structure of folders and use a hashing function on the key to assign each file to folder in that tree.


adamcarter wrote May 7, 2014 at 3:28 PM

Good suggestion. I'll look into getting this implemented.

mabakay wrote May 10, 2014 at 9:09 AM

Folders on file system are like tables in database. If there are many (e.g. for NTFS > 200,000) files, then operations on files could go slow. Simple move against this could be e.g.
string fileName = string.Concat(hashedKey.Substring(0, 4), @"\", hashedKey.Substring(4));