Class Cache
Represents a generic cache where the items have no expiration.
Assembly: Solti.Utils.Primitives.dll
Syntax
public static class Cache : Object
Methods
Clear<TKey, TValue>()
Clears the underlying store associated with the given key and value type.
Declaration
public static void Clear<TKey, TValue>()
where TValue : class
Type Parameters
Name |
Description |
TKey |
|
TValue |
|
GetOrAdd<TKey, TValue>(TKey, Func<TKey, TValue>, String)
Does what its name suggests.
Declaration
public static TValue GetOrAdd<TKey, TValue>(TKey key, Func<TKey, TValue> factory, string scope = "")
where TValue : class
Parameters
Type |
Name |
Description |
TKey |
key |
|
Func<TKey, TValue> |
factory |
|
String |
scope |
|
Returns
Type Parameters
Name |
Description |
TKey |
|
TValue |
|