C# - Inserting and Removing from Cache
Posted
by Nir
on Stack Overflow
See other posts from Stack Overflow
or by Nir
Published on 2010-05-20T06:54:08Z
Indexed on
2010/05/20
7:00 UTC
Read the original article
Hit count: 160
1 - If I insert to Cache by assigning the value:
Cache["key"] = value;
what's the expiration time?
2 - Removing the same value from Cache:
I want to check if the value is in Cache by if(Cache["key"]!=null)
, is it better to remove it from Cache by Cache.Remove("key")
or Cache["key"]=null
?
© Stack Overflow or respective owner