src/DotNetCommon.Core/Cache/ICacheEntry.cs

(完整代码) 2KB

//using Microsoft.Extensions.Primitives;
//using System;
//using System.Collections.Generic;
//using System.Text;
//
//namespace DotNetCommon.Cache
//{
//    /// <summary>
//    /// Represents an entry in the <see cref="IMemoryCache"/> implementation.
//    /// </summary>
//    internal interface ICacheEntry : IDisposable
//    {
//        /// <summary>
//        /// Gets the key of the cache entry.
//        /// </summary>
//        object Key { get; }
//
//        /// <summary>
//        /// Gets or set the value of the cache entry.
//        /// </summary>
//        object Value { get; set; }
//
//        /// <summary>
//        /// Gets or sets an absolute expiration date for the cache entry.
//        /// </summary>
//        DateTimeOffset? AbsoluteExpiration { get; set; }
//
//        /// <summary>
//        /// Gets or sets an absolute expiration time, relative to now.
//        /// </summary>
//        TimeSpan? AbsoluteExpirationRelativeToNow { get; set; }
//
//        /// <summary>
//        /// Gets or sets how long a cache entry can be inactive (e.g. not accessed) before it will be removed.
//        /// This will not extend the entry lifetime beyond the absolute expiration (if set).
//        /// </summary>
//        TimeSpan? SlidingExpiration { get; set; }
//
//        /// <summary>
//        /// Gets the <see cref="IChangeToken"/> instances which cause the cache entry to expire.
//        /// </summary>
//        IList<IChangeToken> ExpirationTokens { get; }
//
//        /// <summary>
//        /// Gets or sets the callbacks will be fired after the cache entry is evicted from the cache.
//        /// </summary>
//        IList<PostEvictionCallbackRegistration> PostEvictionCallbacks { get; }
//
//        /// <summary>
//        /// Gets or sets the priority for keeping the cache entry in the cache during a
//        ///  cleanup. The default is <see cref="CacheItemPriority.Normal"/>.
//        /// </summary>
//        CacheItemPriority Priority { get; set; }
//
//        /// <summary>
//        /// Gets or set the size of the cache entry value.
//        /// </summary>
//        long? Size { get; set; }
//    }
//}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。