c# - What happens when I add item to Cache with TimeSpan.Zero as Expiration? -
c# - What happens when I add item to Cache with TimeSpan.Zero as Expiration? -
in web services app, found code adds item cache:
system.web.caching.cache.insert(cachekey, item, null, cache.noabsoluteexpiration, timespan.zero, cacheitempriority.normal, callback);
in case, seems there no absolute expiration , slidingexpiration beingness set timespan.zero, me means items should expire immediately.
at same time, i've never seen expire, also, not patient plenty sit down there , wait.
so happens in case? there default kicks in when slidingexpiration zero? or never expire
this equal passing cache.noslidingexpiration
, yes, item never expire (except due low amount of available memory).
the static fellow member cache.noslidingexpiration
initialized timespan.zero
. cache.noabsoluteexpiration
initialized timespan.maxvalue
.
c# asp.net web-services caching
Comments
Post a Comment