Windows programming: how to put a frequently accessed file in the OS cache?

Windows programming: how to put a frequently accessed file in the OS cache?

0


source to share


3 answers


Disclaimer: I don't do that much on Windows



In general, you should not interact with the operating system cache. It must be smart enough to cache frequently accessed data. If this is not the case, you must use an application-level cache. I don't know which language you are using, but most likely there is a good cache structure for your language.

+2


source


If your .net file and the file is a dll, look at the Global Assembly Cache (GAC) .



0


source


If your file is accessed frequently and not too large, it will already be in many different caches. Your language cache (eg CRT), filesystem cache (or "OS cache" I assume you mean) and your hard disk cache.

If your file is small and accessed frequently and is still not in the cache, it is either not small enough or not frequently available. You may be able to fix the first problem, but not try to fix the second, as this basically means that other files are available more often than yours, and most likely for some reason. For example, the user is more likely to be using a different application than yours. Trust me it is possible and it is happening.

0


source







All Articles