'Declaration Public Overloads Function Add(Of T)( _ ByVal item As System.Runtime.Caching.CacheItem, _ ByVal policy As System.Runtime.Caching.CacheItemPolicy _ ) As System.Boolean
'Usage Dim instance As BaseCacheProvider Dim item As System.Runtime.Caching.CacheItem Dim policy As System.Runtime.Caching.CacheItemPolicy Dim value As System.Boolean value = instance.Add(Of T)(item, policy)
public System.bool Add<T>( System.Runtime.Caching.CacheItem item, System.Runtime.Caching.CacheItemPolicy policy )
Parameters
- item
- The object 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
Return Value
true if insertion succeeded, or false if there is an already an entry in the cache that has the same key as item.