Adds an entry using key and value pair and absolute expiration date into the cache, and returns an existing cache entry with a matching key.
public override object AddOrGetExisting(
string ,
object ,
DateTime ,
string
)
'Declaration
Public Overloads Overrides Function AddOrGetExisting( _
ByVal As String, _
ByVal As Object, _
ByVal As Date, _
ByVal As String _
) As Object
'Usage
Dim instance As FileCache
Dim key As String
Dim value As Object
Dim absoluteExpiration As Date
Dim regionName As String
Dim value As Object
value = instance.AddOrGetExisting(key, value, absoluteExpiration, regionName)
public:
Object^ AddOrGetExisting(
String^ ,
Object^ ,
DateTime ,
String^
) override
Parameters
- key
- Unique identifier of the cache item.
- value
- Data for the cache item.
- absoluteExpiration
- Absolute expiration date to use.
- regionName
- Optional name of a region in cache.
Return Value
The previous cache entry that matches the specified key, if found. If the cache contains an item with the same key, then it will be returned before it is overwritten. Otherwise, null.