Hi Anders
The cache is written to the disk if takes longer than xx amount of time to render... or that is how i understand how it works. Someone at Adobe could describe how it works much better, Todd?
The problem with AE not overwriting wrong cached frames was much more common just when CS6 was released last year, and is mostly because thirdparty plugins havn't been updated to take care of the disk cache properly. Some times you can work around it by changing some parameter that has no effect on the effect (!) and that will force an update, but sometimes you have to either disable the diskcache (and restart AE) or in worst case, delete ALL your diskcache.Â
But most plugins have been updated to play nicely with the diskcache, so i see it more and more rarely, just make sure you have the latest updates installed.