I try to Empty All Caches and i get this "500 Internal Server Error" and is completed after 10-20 attempts. Errors occur only for blogs with many cache folders (10,000 articles).
"dbcache" folder structure appears to be up to 2 leves, generating 65535 folders 00-ff/00-ff.
In this folders i have only 1 or 2 files.
maybe a 4096 folder structure is sufficient:
Create a folder for storing a single file is a waste of resources and a structure too large, very difficult to removed (try to delete a directory tree structure with 65,535 folders and files)