问题描述
我正在尝试使用Win32 API清除WinInet缓存-通过使缓存条目无效或删除它们(无关紧要)。除了遍历每个条目外,我找不到任何方法可以对整个缓存进行操作-,和与 CACHEGROUP_FLAG_FLUSHURL_ONDELETE,但您必须确保只删除所需的内容。例如,历史记录,Cookie和Internet临时文件都是缓存组。
I'm trying to clear out the WinInet cache using Win32 API - by invalidating the cache entries, or deleting them (doesn't matter). I can't find any way to do this for the whole cache (other than iterating over each entry - example in C#, another in VB) - is this even possible?
I'm fairly certain doing the FindFirst/FindNextUrlCacheEntry() then DeleteUrlCacheEntry() is the only way to make sure it works across all versions of IE.
Alternatively you can use FindFirst/FindNextUrlCacheGroup() and DeleteUrlCacheGroup() with "CACHEGROUP_FLAG_FLUSHURL_ONDELETE" but you have to make sure you only delete what you want. For example, history, cookies and temporary internet files are all Cache groups.
这篇关于如何以编程方式清除MSIE / WinInet缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!