by ComputerGuru · 14y ago · 0 comments
Removing a file from the cache after the fact doesn't address the problem that it kicked some other data out of the cache to take its place in the first place.
Now the copying itself could've been done by using NO_BUFFERING, but if it's done by program you don't have access (or it's not straightforward copying, but say rsync (DeltaCopy) or something like that).
It's not the same really as you are saying, but related somehow.
We had to do this at our studio, there was a process copying lots of fresh sound banks for the game, and it was trashing the cache which is normally filled with the game assets that are used during level building. Originally we though of directly copying files using NO_BUFFERING, but because the app was written in #C, it was a bit harder (and we didn't want to introduce insecurities). So the programmer in charge, just added one more Open/Close after the file was copied which was done with NO_BUFFERING - this purged the file from the cache.
Obviously not going to work, if instead of many sound banks, it was one huge taking all space. But since that was not the case, we took the opportunity.