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




KellermanSoftware.NetCachingLibrary.CacheProviders Namespace > MemoryCacheProvider Class > Set Method : Set<T>(CacheItem,CacheItemPolicy) Method
The cache item to add.
An object that contains eviction details for the cache entry. This object provides more options for eviction than a simple absolute expiration.
Inserts or update the cache entry in the cache as a System.Runtime.Caching.CacheItem instance, specifying information about how the entry will be evicted.
Syntax
'Declaration
 
Public Overloads Overrides Sub Set(Of T)( _
   ByVal item As System.Runtime.Caching.CacheItem, _
   ByVal policy As System.Runtime.Caching.CacheItemPolicy _
) 
'Usage
 
Dim instance As MemoryCacheProvider
Dim item As System.Runtime.Caching.CacheItem
Dim policy As System.Runtime.Caching.CacheItemPolicy
 
instance.Set(Of T)(item, policy)
public override void Set<T>( 
   System.Runtime.Caching.CacheItem item,
   System.Runtime.Caching.CacheItemPolicy policy
)
public: void Set<T>( 
   System.Runtime.Caching.CacheItem* item,
   System.Runtime.Caching.CacheItemPolicy* policy
) override 
public:
void Setgeneric<typename T>
( 
   System.Runtime.Caching.CacheItem^ item,
   System.Runtime.Caching.CacheItemPolicy^ policy
) override 

Parameters

item
The cache item to add.
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
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

MemoryCacheProvider Class
MemoryCacheProvider Members
Overload List