using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Web; using System.Web.Caching; namespace HH.AMS.Ex.Factroy { /// /// 对象缓存操作类 /// public class ObjectCache { /// /// 获取当前应用程序指定CacheKey的Cache值 /// /// /// public static object GetCache(string CacheKey) { Cache objCache = HttpRuntime.Cache; return objCache[CacheKey]; } /// /// 设置当前应用程序指定CacheKey的Cache值 /// /// /// public static void SetCache(string CacheKey, object objObject) { Cache objCache = HttpRuntime.Cache; objCache.Insert(CacheKey, objObject); } } }