'Declaration Public Overloads Function AddOrGetExisting(Of T)( _ ByVal key As System.String, _ ByVal value As T, _ ByVal absoluteExpiration As System.DateTimeOffset, _ Optional ByVal regionName As System.String _ ) As T
'Usage Dim instance As BaseCacheProvider Dim key As System.String Dim value As T Dim absoluteExpiration As System.DateTimeOffset Dim regionName As System.String Dim value As T value = instance.AddOrGetExisting(Of T)(key, value, absoluteExpiration, regionName)
public T AddOrGetExisting<T>( System.string key, T value, System.DateTimeOffset absoluteExpiration, System.string regionName )
public: T* AddOrGetExisting<T>( System.string* key, T* value, System.DateTimeOffset absoluteExpiration, System.string* regionName )
public: T^ AddOrGetExistinggeneric<typename T> ( System.String^ key, T^ value, System.DateTimeOffset absoluteExpiration, System.String^ regionName )
Parameters
- key
- A unique identifier for the cache entry.
- value
- The object to insert.
- absoluteExpiration
- The fixed date and time at which the cache entry will expire.
- regionName
- Optional. A named region in the cache to which the cache entry can be added. The default value for the optional parameter is Default
Type Parameters
- T
Return Value
If a cache entry with the same key exists, the specified cache entry's value; otherwise, null.