【问题标题】:How to update absolute expiration of existing cache items in MemoryCache.Default如何更新 MemoryCache.Default 中现有缓存项的绝对过期时间
【发布时间】:2016-03-17 11:31:23
【问题描述】:

我正在使用 C# 和 .NET,并且我在 MemoryCache.Default 中存储了一个 CacheItem。

我只想更新它的绝对过期时间而不重新插入它。

我只想获取 CacheItem 并更新其过期时间。

任何帮助将不胜感激。

【问题讨论】:

    标签: .net memorycache


    【解决方案1】:

    我找到了。

    MemoryCache 对象中有一个“Set”方法。

    谢谢大家。

    【讨论】:

      猜你喜欢
      • 2013-11-18
      • 2019-01-16
      • 2012-07-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-21
      • 1970-01-01
      • 2017-02-13
      相关资源
      最近更新 更多