Represents a generic cache item holding values and metadata for cache managers and handles. Reuse when building or extending custom caching layers and storage providers.
// Source: https://github.com/MichaCo/CacheManager | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
using System;
using CacheManager.Core.Internal;
#if !NETSTANDARD2_0
using System.Runtime.Serialization;
#endif
using static CacheManager.Core.Utility.Guard;
namespace CacheManager.Core
{
/// <summary>
/// The item which will be stored in the cache holding the cache value and additional
/// information needed by the cache handles and manager.
/// </summary>
/// <typeparam name="T">The type of the cache value.</typeparam>
#if !NETSTANDARD2_0
[Serializable]
public class CacheItem<T> : ISerializable, ICacheItemProperties
#else
public class CacheItem
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key