.NET 缓存设计的使用说明(2)

/// <summary>
        /// 缓存obj 并建立依赖项
        /// </summary>
        /// <param></param>
        /// <param></param>
        /// <param></param>
        public static void Insert(string key, object obj, CacheDependency dep)
        {
            Insert(key, obj, dep, MinuteFactor * );
        }

/// <summary>
        /// 按秒缓存对象
        /// </summary>
        /// <param></param>
        /// <param></param>
        /// <param></param>
        public static void Insert(string key, object obj, int seconds)
        {
            Insert(key, obj, null, seconds);
        }

/// <summary>
        /// 按秒缓存对象 并存储优先级
        /// </summary>
        /// <param></param>
        /// <param></param>
        /// <param></param>
        /// <param></param>
        public static void Insert(string key, object obj, int seconds, CacheItemPriority priority)
        {
            Insert(key, obj, null, seconds, priority);
        }

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wjdysx.html