←Select platform

AddOrGetExisting(CacheItem,CacheItemPolicy) Method

Summary

Adds a cache entry into the cache, and returns an existing cache entry with a matching key.

Syntax
C#
VB
C++
public virtual CacheItem AddOrGetExisting( 
   CacheItem item, 
   CacheItemPolicy policy 
) 
Public Overridable Function AddOrGetExisting( 
   ByVal item As CacheItem, 
   ByVal policy As CacheItemPolicy 
) As CacheItem 
public:  
   virtual CacheItem^ AddOrGetExisting( 
      CacheItem^ item, 
      CacheItemPolicy^ policy 
   ) 

Parameters

item

Cache item to add.

policy

Expiration policy for the item.

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.

Requirements
Target Platforms
Help Version 21.0.2021.3.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Caching Assembly