Cache.Insert( "MostPopularUser ", arrItem, null, DateTime.Now.AddMinutes(20), TimeSpan.Zero,CacheItemPriority.NotRemovable,null);
1.资源紧张,缓存如果没有设置为NotRemovable的话,会被移除
2.asp.net进程被回收
3.读缓存的时候要判断一下是否为null,为null就重新生成缓存项
Cache.Insert( "MostPopularUser ", arrItem, null, DateTime.Now.AddMinutes(20), TimeSpan.Zero,CacheItemPriority.NotRemovable,null);
1.资源紧张,缓存如果没有设置为NotRemovable的话,会被移除
2.asp.net进程被回收
3.读缓存的时候要判断一下是否为null,为null就重新生成缓存项