如何以编程方式清除MSIE / WinInet缓存? [英] How to clear MSIE/WinInet cache programmatically?
问题描述
我正在尝试使用Win32 API清除WinInet缓存-通过使缓存条目无效或删除它们(无关紧要)。除了遍历每个条目外,我找不到任何方法可以对整个缓存进行操作- C#中的示例, 我相当确定依次使用FindFirst / FindNextUrlCacheEntry()和DeleteUrlCacheEntry()是确保它可在所有版本的IE上运行的唯一方法。 http://msdn.microsoft.com/zh-cn/library/aa384126(VS.85).aspx rel = nofollow noreferrer> FindNextUrlCacheGroup()
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缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!