ObjectCache.GetCacheItem(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When overridden in a derived class, gets the specified cache entry from the cache as a CacheItem instance.
public abstract System.Runtime.Caching.CacheItem GetCacheItem (string key, string regionName = default);
abstract member GetCacheItem : string * string -> System.Runtime.Caching.CacheItem
Public MustOverride Function GetCacheItem (key As String, Optional regionName As String = Nothing) As CacheItem
Parameters
- key
- String
A unique identifier for the cache entry to get.
- regionName
- String
Optional. A named region in the cache to which the cache was added, if regions are implemented. Because regions are not implemented in .NET Framework 4, the default is null
.
Returns
The cache entry that is identified by key
.
Remarks
This method overload exists because some cache implementations might extend the CacheItem class. In that case, the Get(String, String) method overload will not necessarily return all the information about cached data. However, the GetCacheItem(String, String) method overload enables custom caches to return more than just the cache value.
The GetCacheItem(String, String) method is like the Get(String, String) method, except that the GetCacheItem(String, String) method returns return the cache entry as a CacheItem instance.
Applies to
Povratne informacije
https://aka.ms/ContentUserFeedback.
Kmalu na voljo: V letu 2024 bomo ukinili storitev Težave v storitvi GitHub kot mehanizem za povratne informacije za vsebino in jo zamenjali z novim sistemom za povratne informacije. Za več informacij si oglejte:Pošlji in prikaži povratne informacije za