c# - How do I clear the server cache in asp.net? -
how clear server cache in asp.net? have found out there 2 kinds of cache. there browser cache , server cache. have done searching have yet find clear, step-by-step guide clearing server cache using asp.net (or not).
(update) learned code-behind in vb - visual basic (dot net).
you loop through cache items , delete them 1 one:
foreach (system.collections.dictionaryentry entry in httpcontext.current.cache){ httpcontext.current.cache.remove(string(entry.key)); }
syntax correction asp.net 4.5 c#
foreach (system.collections.dictionaryentry entry in httpcontext.current.cache){ httpcontext.current.cache.remove((string)entry.key); }
Comments
Post a Comment