存放位置:服务器内存,用于频繁访问且不轻易更改的内容缓存。

  

string CacheKey = "CT1"; //检索指定项,
object objModel = Cache.Get(CacheKey);
if (objModel == null)
{
objModel = "插入值";
Cache.Insert(CacheKey, objModel, null, DateTime.Now.AddMinutes(120), System.Web.Caching.Cache.NoSlidingExpiration);
} //缓存120分钟

  

相关文章:

  • 2021-08-23
  • 2022-02-25
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-18
猜你喜欢
  • 2022-02-13
  • 2022-12-23
  • 2021-11-04
  • 2021-11-24
  • 2021-12-24
  • 2021-09-13
  • 2021-08-06
相关资源
相似解决方案