例:
1、创建缓存并存入数据
1 Cache CacheXML = HttpRuntime.Cache; 2 if (obj != null) 3 { 4 CacheXML.Insert("XMLobj", obj);
5 }
2、读取缓存数据
1 var objCache = HttpRuntime.Cache.Get("XMLobj"); 2 listall = (List<CustomReport>)objCache;
参考:
http://www.cnblogs.com/kissdodog/archive/2013/05/07/3064895.html