I am using simple data caching in c# .NET without dependencies
and
I don't clear the cache anywhere. But when I delete a directory,
cache is cleared completely. Why ???
List<Software> Softwares=new List<Software>();
string cacheKey ="Software_List"
if(HttpContext.Current.Cache.[cacheKey]==null)
{
Softwares=Software.GetSoftwares();
HttpContext.Current.Cache.Insert(cacheKey,Softwares,null,DateTime.Now.AddMinutes(300)TimeSpan.Zero)
}
else
{
Softwares=HttpContext.Current.Cache.[cacheKey] as List<Software> ;