Sdl.Web.Tridion/Providers/Caching/DxaCacheProvider.cs
/// <summary>
/// Stores a given key/value pair to a given cache Region.
/// </summary>
/// <param name="key">The key.</param>
/// <param name="region">The name of the cache region. Different cache regions can have different retention policies.</param>
/// <param name="value">The value. If <c>null</c>, this effectively removes the key from the cache.</param>
/// <param name="dependencies">An optional set of dependent item IDs. Can be used to invalidate the cached item.</param>
/// <typeparam name="T">The type of the value to add.</typeparam>
Stores a given key/value pair to a given cache Region.
Stores a given key / value pair to a given cache Region .
public override void Store<T>(string key, string region, T value, IEnumerable<string> dependencies = null)
        {
            _cilCacheProvider.Remove(key, region);  
            if (value != null)
            {
                _cilCacheProvider.Set(key, value, region);
            }
        }
public override void Store < T > ( string key , string region , T value , IEnumerable < string > dependencies = null ) { _cilCacheProvider . Remove ( key , region ) ; if ( value != null ) { _cilCacheProvider . Set ( key , value , region ) ; } }
Stores a given key/value pair to a given cache Region.
Stores a given key / value pair to a given cache Region .
//TODO: remove when using latest UDP version since this is no longer needed
key
string
None
region
string
The name of the cache region. Different cache regions can have different retention policies.
The name of the cache region . Different cache regions can have different retention policies .
value
T
The value. If null
The value . If null
dependencies
IEnumerable<string>
An optional set of dependent item IDs. Can be used to invalidate the cached item.
An optional set of dependent item IDs . Can be used to invalidate the cached item .
typeparam
The type of the value to add.
The type of the value to add .