[eluser]WanWizard[/eluser]
Depends a bit on the filesystem used, and the speed of the storage system.
On Windows, you definately want to limit the number of files in a directory to a few thousand. On Linux (ext3), thousands of files is not a problem. You can increase the speed on ext3 by formatting the volume with the 'dir_index' parameter, which implements a btree algorithm for directory indexes.
How big are these cache files? Maybe you can get a better speed gain if you cache in memory (a simple memdisk would be enough, other solutions require a extended cache library).