Sorry for the incomplete patch to the rewrite rules, I wrote it afterwards as I changed the rewrite rules by hand while developing.
As of deleting cache files, my cache files do get pruned, but I suspect I have some issues with pruning in my installation (it happens way too often, I have to look into that). If you point me to where I should correct the deletion of the cache files, I’d be happy to help with a patch.
Also, I’ve seen that the pruning function is called recursively. If I understood its working correctly, this can be a problem on large installations (with thousands of blogs) as you may risk encountering the max recursion limit of php (100 by default) when pruning directories recursively.