NET Caching Library Help
AddOrGetExisting<T>(CacheItem,CacheItemPolicy) Method




KellermanSoftware.NetCachingLibrary.CacheProviders Namespace > BaseCacheProvider Class > AddOrGetExisting Method : AddOrGetExisting<T>(CacheItem,CacheItemPolicy) Method
The object to insert.
An object that contains eviction details for the cache entry. This object provides more options for eviction than a simple absolute expiration.
Inserts the specified System.Runtime.Caching.CacheItem object into the cache, specifying information about how the entry will be evicted.
Syntax
'Declaration
 
Public Overloads Function AddOrGetExisting(Of T)( _
   ByVal value As System.Runtime.Caching.CacheItem, _
   ByVal policy As System.Runtime.Caching.CacheItemPolicy _
) As System.Runtime.Caching.CacheItem
'Usage
 
Dim instance As BaseCacheProvider
Dim value As System.Runtime.Caching.CacheItem
Dim policy As System.Runtime.Caching.CacheItemPolicy
Dim value As System.Runtime.Caching.CacheItem
 
value = instance.AddOrGetExisting(Of T)(value, policy)
public System.Runtime.Caching.CacheItem AddOrGetExisting<T>( 
   System.Runtime.Caching.CacheItem value,
   System.Runtime.Caching.CacheItemPolicy policy
)
public: System.Runtime.Caching.CacheItem* AddOrGetExisting<T>( 
   System.Runtime.Caching.CacheItem* value,
   System.Runtime.Caching.CacheItemPolicy* policy
) 
public:
System.Runtime.Caching.CacheItem^ AddOrGetExistinggeneric<typename T>
( 
   System.Runtime.Caching.CacheItem^ value,
   System.Runtime.Caching.CacheItemPolicy^ policy
) 

Parameters

value
The object to insert.
policy
An object that contains eviction details for the cache entry. This object provides more options for eviction than a simple absolute expiration.

Type Parameters

T

Return Value

If a cache entry with the same key exists, the specified cache entry; otherwise, null.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

BaseCacheProvider Class
BaseCacheProvider Members
Overload List