Core/CafeLib.Core.Caching/MemoryCache.cs
/// <summary>
/// Set an item in the cache.
/// </summary>
/// <typeparam name="T">item type</typeparam>
/// <param name="key">item key</param>
/// <param name="item">item</param>
/// <param name="update">if true force item set of the item, otherwise default behavior</param>
/// <returns>true if added to the cache otherwise false</returns>
Set an item in the cache.
Set an item in the cache .
public bool Set<T>(NonNullable<string> key, T item, bool update) where T : class
        {
            if (update)
            {
                _cache.Remove(CacheKey<T>(key), typeof(T).AssemblyQualifiedName);
            }
            return Set(CacheKey<T>(key), item);
        }
public bool Set < T > ( NonNullable < string > key , T item , bool update ) where T : class { if ( update ) { _cache . Remove ( CacheKey < T > ( key ) , typeof ( T ) . AssemblyQualifiedName ) ; } return Set ( CacheKey < T > ( key ) , item ) ; }
Set an item in the cache.
Set an item in the cache .
true if added to the cache otherwise false
true if added to the cache otherwise false
key
NonNullable<string>
None
item
T
None
update
bool
if true force item set of the item, otherwise default behavior
if true force item set of the item otherwise default behavior
typeparam
None