Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1017 lines (946 sloc) 75.2 KB
<Type Name="ObjectCache" FullName="System.Runtime.Caching.ObjectCache">
<TypeSignature Language="C#" Value="public abstract class ObjectCache : System.Collections.Generic.IEnumerable&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt;" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract beforefieldinit ObjectCache extends System.Object implements class System.Collections.Generic.IEnumerable`1&lt;valuetype System.Collections.Generic.KeyValuePair`2&lt;string, object&gt;&gt;, class System.Collections.IEnumerable" />
<TypeSignature Language="DocId" Value="T:System.Runtime.Caching.ObjectCache" />
<TypeSignature Language="VB.NET" Value="Public MustInherit Class ObjectCache&#xA;Implements IEnumerable(Of KeyValuePair(Of String, Object))" />
<TypeSignature Language="C++ CLI" Value="public ref class ObjectCache abstract : System::Collections::Generic::IEnumerable&lt;System::Collections::Generic::KeyValuePair&lt;System::String ^, System::Object ^&gt;&gt;" />
<TypeSignature Language="F#" Value="type ObjectCache = class&#xA; interface seq&lt;KeyValuePair&lt;string, obj&gt;&gt;&#xA; interface IEnumerable" />
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Collections.Generic.IEnumerable&lt;System.Collections.Generic.KeyValuePair&lt;System.String,System.Object&gt;&gt;</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Collections.IEnumerable</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>Represents an object cache and provides the base methods and properties for accessing the object cache.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Runtime.Caching.ObjectCache> type is the primary type for the in-memory object cache. To develop a custom cache implementation, you derive from the <xref:System.Runtime.Caching.ObjectCache> class.
> [!NOTE]
> The <xref:System.Runtime.Caching.ObjectCache> class is new as of the [!INCLUDE[net_v40_short](~/includes/net-v40-short-md.md)].
The built-in <xref:System.Runtime.Caching.MemoryCache> class derives from the <xref:System.Runtime.Caching.ObjectCache> class. The <xref:System.Runtime.Caching.MemoryCache> class is the only concrete object cache implementation in the [!INCLUDE[net_v40_short](~/includes/net-v40-short-md.md)] that derives from the <xref:System.Runtime.Caching.ObjectCache> class.
]]></format>
</remarks>
<threadsafe>This type is thread safe.</threadsafe>
<block subset="none" type="overrides">
<para>Because the <see cref="T:System.Runtime.Caching.ObjectCache" /> type represents only common cache functions, there is no requirement for how an <see cref="T:System.Runtime.Caching.ObjectCache" /> instance must be instantiated and obtained. In addition, there is no requirement that concrete implementations of the <see cref="T:System.Runtime.Caching.ObjectCache" /> class must be singletons.
<block subset="none" type="note"><para><see cref="T:System.Runtime.Caching.MemoryCache" /> is not a singleton, but you should create only a few or potentially only one <see cref="T:System.Runtime.Caching.MemoryCache" /> instance and code that caches items should use those instances.
</para></block>
When you inherit from the <see cref="T:System.Runtime.Caching.ObjectCache" /> class, you must override its methods.</para>
</block>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected ObjectCache ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.#ctor" />
<MemberSignature Language="VB.NET" Value="Protected Sub New ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; ObjectCache();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Called from constructors in derived classes in order to initialize the <see cref="T:System.Runtime.Caching.ObjectCache" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<MemberGroup MemberName="Add">
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>When overridden in a derived class, inserts a cache entry into the cache, without requiring that an existing cache entry with a matching key be returned.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Runtime.Caching.ObjectCache.Add%2A> method overloads try to insert a cache entry into the cache, without overwriting or removing an existing cache entry that has the same key. The cache entry can be a typed <xref:System.Runtime.Caching.CacheItem> object or a generic object.
The <xref:System.Runtime.Caching.ObjectCache.AddOrGetExisting%2A> method overloads and the <xref:System.Runtime.Caching.ObjectCache.Add%2A> method overloads have one significant difference. When these methods insert a cache entry, if a matching entry is found in the cache, the <xref:System.Runtime.Caching.ObjectCache.AddOrGetExisting%2A> method overloads return the existing cache entry, but the <xref:System.Runtime.Caching.ObjectCache.Add%2A> method overloads do not. Having these different method overloads enables callers to optimize their code based on whether they need the existing cache entry. In distributed caches, returning an existing value by using the <xref:System.Runtime.Caching.ObjectCache.AddOrGetExisting%2A> method might be more expensive than returning a Boolean value by using <xref:System.Runtime.Caching.ObjectCache.Add%2A> method.
]]></format>
</remarks>
</Docs>
</MemberGroup>
<Member MemberName="Add">
<MemberSignature Language="C#" Value="public virtual bool Add (System.Runtime.Caching.CacheItem item, System.Runtime.Caching.CacheItemPolicy policy);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool Add(class System.Runtime.Caching.CacheItem item, class System.Runtime.Caching.CacheItemPolicy policy) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.Add(System.Runtime.Caching.CacheItem,System.Runtime.Caching.CacheItemPolicy)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function Add (item As CacheItem, policy As CacheItemPolicy) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual bool Add(System::Runtime::Caching::CacheItem ^ item, System::Runtime::Caching::CacheItemPolicy ^ policy);" />
<MemberSignature Language="F#" Value="abstract member Add : System.Runtime.Caching.CacheItem * System.Runtime.Caching.CacheItemPolicy -&gt; bool&#xA;override this.Add : System.Runtime.Caching.CacheItem * System.Runtime.Caching.CacheItemPolicy -&gt; bool" Usage="objectCache.Add (item, policy)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="item" Type="System.Runtime.Caching.CacheItem" />
<Parameter Name="policy" Type="System.Runtime.Caching.CacheItemPolicy" />
</Parameters>
<Docs>
<param name="item">The object to add.</param>
<param name="policy">An object that contains eviction details for the cache entry. This object provides more options for eviction than a simple absolute expiration.</param>
<summary>When overridden in a derived class, tries to insert a cache entry into the cache as a <see cref="T:System.Runtime.Caching.CacheItem" /> instance, and adds details about how the entry should be evicted.</summary>
<returns>
<see langword="true" /> if insertion succeeded, or <see langword="false" /> if there is an already an entry in the cache that has the same key as <paramref name="item" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Runtime.Caching.ObjectCache.Add%2A> method overloads are virtual (not abstract) on the <xref:System.Runtime.Caching.ObjectCache> class, because the <xref:System.Runtime.Caching.ObjectCache.Add%2A> method internally calls <xref:System.Runtime.Caching.ObjectCache.AddOrGetExisting%2A>. This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the <xref:System.Runtime.Caching.ObjectCache.Add%2A> method, it can just implement the <xref:System.Runtime.Caching.ObjectCache.AddOrGetExisting%2A> method overloads.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Add">
<MemberSignature Language="C#" Value="public virtual bool Add (string key, object value, DateTimeOffset absoluteExpiration, string regionName = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool Add(string key, object value, valuetype System.DateTimeOffset absoluteExpiration, string regionName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.Add(System.String,System.Object,System.DateTimeOffset,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function Add (key As String, value As Object, absoluteExpiration As DateTimeOffset, Optional regionName As String = null) As Boolean" />
<MemberSignature Language="F#" Value="abstract member Add : string * obj * DateTimeOffset * string -&gt; bool&#xA;override this.Add : string * obj * DateTimeOffset * string -&gt; bool" Usage="objectCache.Add (key, value, absoluteExpiration, regionName)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
<Parameter Name="value" Type="System.Object" />
<Parameter Name="absoluteExpiration" Type="System.DateTimeOffset" />
<Parameter Name="regionName" Type="System.String" />
</Parameters>
<Docs>
<param name="key">A unique identifier for the cache entry.</param>
<param name="value">The object to insert.</param>
<param name="absoluteExpiration">The fixed date and time at which the cache entry will expire. This parameter is required when the <see cref="Overload:System.Runtime.Caching.ObjectCache.Add" /> method is called.</param>
<param name="regionName">Optional. A named region in the cache to which the cache entry can be added, if regions are implemented. Because regions are not implemented in [!INCLUDE[net_v40_short](~/includes/net-v40-short-md.md)], the default value is <see langword="null" />.</param>
<summary>When overridden in a derived class, inserts a cache entry into the cache without overwriting any existing cache entry.</summary>
<returns>
<see langword="true" /> if insertion succeeded, or <see langword="false" /> if there is an already an entry in the cache that has the same key as <paramref name="key" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Runtime.Caching.ObjectCache.Add%2A> method overloads are virtual (not abstract) on the <xref:System.Runtime.Caching.ObjectCache> class, because the <xref:System.Runtime.Caching.ObjectCache.Add%2A> method internally calls <xref:System.Runtime.Caching.ObjectCache.AddOrGetExisting%2A>. This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the <xref:System.Runtime.Caching.ObjectCache.Add%2A> method, it can just implement the <xref:System.Runtime.Caching.ObjectCache.AddOrGetExisting%2A> method overloads.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Add">
<MemberSignature Language="C#" Value="public virtual bool Add (string key, object value, System.Runtime.Caching.CacheItemPolicy policy, string regionName = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool Add(string key, object value, class System.Runtime.Caching.CacheItemPolicy policy, string regionName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.Add(System.String,System.Object,System.Runtime.Caching.CacheItemPolicy,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function Add (key As String, value As Object, policy As CacheItemPolicy, Optional regionName As String = null) As Boolean" />
<MemberSignature Language="F#" Value="abstract member Add : string * obj * System.Runtime.Caching.CacheItemPolicy * string -&gt; bool&#xA;override this.Add : string * obj * System.Runtime.Caching.CacheItemPolicy * string -&gt; bool" Usage="objectCache.Add (key, value, policy, regionName)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
<Parameter Name="value" Type="System.Object" />
<Parameter Name="policy" Type="System.Runtime.Caching.CacheItemPolicy" />
<Parameter Name="regionName" Type="System.String" />
</Parameters>
<Docs>
<param name="key">A unique identifier for the cache entry.</param>
<param name="value">The object to insert.</param>
<param name="policy">An object that contains eviction details for the cache entry. This object provides more options for eviction than a simple absolute expiration.</param>
<param name="regionName">Optional. A named region in the cache to which the cache entry can be added, if regions are implemented. The default value for the optional parameter is <see langword="null" />.</param>
<summary>When overridden in a derived class, inserts a cache entry into the cache, specifying information about how the entry will be evicted.</summary>
<returns>
<see langword="true" /> if the insertion try succeeds, or <see langword="false" /> if there is an already an entry in the cache with the same key as <paramref name="key" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Runtime.Caching.ObjectCache.Add%2A> method overloads are virtual (not abstract) on the <xref:System.Runtime.Caching.ObjectCache> class, because the <xref:System.Runtime.Caching.ObjectCache.Add%2A> method internally calls <xref:System.Runtime.Caching.ObjectCache.AddOrGetExisting%2A>. This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the <xref:System.Runtime.Caching.ObjectCache.Add%2A> method, it can just implement the <xref:System.Runtime.Caching.ObjectCache.AddOrGetExisting%2A> method overloads.
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="AddOrGetExisting">
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>When overridden in a derived class, tries to insert a cache entry into the cache, and returns an existing cache entry with a matching key.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Runtime.Caching.ObjectCache.AddOrGetExisting%2A> method overloads insert an entry into the cache. If a cache entry with a matching key already exists, they return the existing entry. The cache entry can be a <xref:System.Runtime.Caching.CacheItem> object or a generic object.
There is one difference between the <xref:System.Runtime.Caching.ObjectCache.AddOrGetExisting%2A> overloads and the <xref:System.Runtime.Caching.ObjectCache.Add%2A> overloads. When these overloaded methods try to insert a cache entry, if an existing entry is found that has a key that matches an existing inserted cache entry, the <xref:System.Runtime.Caching.ObjectCache.AddOrGetExisting%2A> overloads return the existing cache entry. The <xref:System.Runtime.Caching.ObjectCache.Add%2A> overloads do not.
]]></format>
</remarks>
</Docs>
</MemberGroup>
<Member MemberName="AddOrGetExisting">
<MemberSignature Language="C#" Value="public abstract System.Runtime.Caching.CacheItem AddOrGetExisting (System.Runtime.Caching.CacheItem value, System.Runtime.Caching.CacheItemPolicy policy);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Runtime.Caching.CacheItem AddOrGetExisting(class System.Runtime.Caching.CacheItem value, class System.Runtime.Caching.CacheItemPolicy policy) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.AddOrGetExisting(System.Runtime.Caching.CacheItem,System.Runtime.Caching.CacheItemPolicy)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function AddOrGetExisting (value As CacheItem, policy As CacheItemPolicy) As CacheItem" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; abstract System::Runtime::Caching::CacheItem ^ AddOrGetExisting(System::Runtime::Caching::CacheItem ^ value, System::Runtime::Caching::CacheItemPolicy ^ policy);" />
<MemberSignature Language="F#" Value="abstract member AddOrGetExisting : System.Runtime.Caching.CacheItem * System.Runtime.Caching.CacheItemPolicy -&gt; System.Runtime.Caching.CacheItem" Usage="objectCache.AddOrGetExisting (value, policy)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Runtime.Caching.CacheItem</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Runtime.Caching.CacheItem" />
<Parameter Name="policy" Type="System.Runtime.Caching.CacheItemPolicy" />
</Parameters>
<Docs>
<param name="value">The object to insert.</param>
<param name="policy">An object that contains eviction details for the cache entry. This object provides more options for eviction than a simple absolute expiration.</param>
<summary>When overridden in a derived class, inserts the specified <see cref="T:System.Runtime.Caching.CacheItem" /> object into the cache, specifying information about how the entry will be evicted.</summary>
<returns>If a cache entry with the same key exists, the specified cache entry; otherwise, <see langword="null" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AddOrGetExisting">
<MemberSignature Language="C#" Value="public abstract object AddOrGetExisting (string key, object value, DateTimeOffset absoluteExpiration, string regionName = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance object AddOrGetExisting(string key, object value, valuetype System.DateTimeOffset absoluteExpiration, string regionName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.AddOrGetExisting(System.String,System.Object,System.DateTimeOffset,System.String)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function AddOrGetExisting (key As String, value As Object, absoluteExpiration As DateTimeOffset, Optional regionName As String = null) As Object" />
<MemberSignature Language="F#" Value="abstract member AddOrGetExisting : string * obj * DateTimeOffset * string -&gt; obj" Usage="objectCache.AddOrGetExisting (key, value, absoluteExpiration, regionName)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
<Parameter Name="value" Type="System.Object" />
<Parameter Name="absoluteExpiration" Type="System.DateTimeOffset" />
<Parameter Name="regionName" Type="System.String" />
</Parameters>
<Docs>
<param name="key">A unique identifier for the cache entry.</param>
<param name="value">The object to insert.</param>
<param name="absoluteExpiration">The fixed date and time at which the cache entry will expire.</param>
<param name="regionName">Optional. A named region in the cache to which the cache entry can be added, if regions are implemented. The default value for the optional parameter is <see langword="null" />.</param>
<summary>When overridden in a derived class, inserts a cache entry into the cache, by using a key, an object for the cache entry, an absolute expiration value, and an optional region to add the cache into.</summary>
<returns>If a cache entry with the same key exists, the specified cache entry's value; otherwise, <see langword="null" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This <xref:System.Runtime.Caching.ObjectCache.AddOrGetExisting%28System.String%2CSystem.Object%2CSystem.DateTimeOffset%2CSystem.String%29> method overload returns an object value, not a <xref:System.Runtime.Caching.CacheItem> object.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="AddOrGetExisting">
<MemberSignature Language="C#" Value="public abstract object AddOrGetExisting (string key, object value, System.Runtime.Caching.CacheItemPolicy policy, string regionName = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance object AddOrGetExisting(string key, object value, class System.Runtime.Caching.CacheItemPolicy policy, string regionName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.AddOrGetExisting(System.String,System.Object,System.Runtime.Caching.CacheItemPolicy,System.String)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function AddOrGetExisting (key As String, value As Object, policy As CacheItemPolicy, Optional regionName As String = null) As Object" />
<MemberSignature Language="F#" Value="abstract member AddOrGetExisting : string * obj * System.Runtime.Caching.CacheItemPolicy * string -&gt; obj" Usage="objectCache.AddOrGetExisting (key, value, policy, regionName)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
<Parameter Name="value" Type="System.Object" />
<Parameter Name="policy" Type="System.Runtime.Caching.CacheItemPolicy" />
<Parameter Name="regionName" Type="System.String" />
</Parameters>
<Docs>
<param name="key">A unique identifier for the cache entry.</param>
<param name="value">The object to insert.</param>
<param name="policy">An object that contains eviction details for the cache entry. This object provides more options for eviction than a simple absolute expiration.</param>
<param name="regionName">Optional. A named region in the cache to which the cache entry can be added, if regions are implemented. The default value for the optional parameter is <see langword="null" />.</param>
<summary>When overridden in a derived class, inserts a cache entry into the cache, specifying a key and a value for the cache entry, and information about how the entry will be evicted.</summary>
<returns>If a cache entry with the same key exists, the specified cache entry's value; otherwise, <see langword="null" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Runtime.Caching.ObjectCache.AddOrGetExisting%28System.String%2CSystem.Object%2CSystem.Runtime.Caching.CacheItemPolicy%2CSystem.String%29> method returns an object value, not a <xref:System.Runtime.Caching.CacheItem> object.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Contains">
<MemberSignature Language="C#" Value="public abstract bool Contains (string key, string regionName = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool Contains(string key, string regionName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.Contains(System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function Contains (key As String, Optional regionName As String = null) As Boolean" />
<MemberSignature Language="F#" Value="abstract member Contains : string * string -&gt; bool" Usage="objectCache.Contains (key, regionName)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
<Parameter Name="regionName" Type="System.String" />
</Parameters>
<Docs>
<param name="key">A unique identifier for the cache entry.</param>
<param name="regionName">Optional. A named region in the cache where the cache can be found, if regions are implemented. The default value for the optional parameter is <see langword="null" />.</param>
<summary>When overridden in a derived class, checks whether the cache entry already exists in the cache.</summary>
<returns>
<see langword="true" /> if the cache contains a cache entry with the same key value as <paramref name="key" />; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateCacheEntryChangeMonitor">
<MemberSignature Language="C#" Value="public abstract System.Runtime.Caching.CacheEntryChangeMonitor CreateCacheEntryChangeMonitor (System.Collections.Generic.IEnumerable&lt;string&gt; keys, string regionName = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Runtime.Caching.CacheEntryChangeMonitor CreateCacheEntryChangeMonitor(class System.Collections.Generic.IEnumerable`1&lt;string&gt; keys, string regionName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.CreateCacheEntryChangeMonitor(System.Collections.Generic.IEnumerable{System.String},System.String)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function CreateCacheEntryChangeMonitor (keys As IEnumerable(Of String), Optional regionName As String = null) As CacheEntryChangeMonitor" />
<MemberSignature Language="F#" Value="abstract member CreateCacheEntryChangeMonitor : seq&lt;string&gt; * string -&gt; System.Runtime.Caching.CacheEntryChangeMonitor" Usage="objectCache.CreateCacheEntryChangeMonitor (keys, regionName)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Runtime.Caching.CacheEntryChangeMonitor</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="keys" Type="System.Collections.Generic.IEnumerable&lt;System.String&gt;" />
<Parameter Name="regionName" Type="System.String" />
</Parameters>
<Docs>
<param name="keys">The unique identifiers for cache entries to monitor.</param>
<param name="regionName">Optional. A named region in the cache where the cache keys in the <paramref name="keys" /> parameter exist, if regions are implemented. The default value for the optional parameter is <see langword="null" />.</param>
<summary>When overridden in a derived class, creates a <see cref="T:System.Runtime.Caching.CacheEntryChangeMonitor" /> object that can trigger events in response to changes to specified cache entries.</summary>
<returns>A change monitor that monitors cache entries in the cache.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When a derived <xref:System.Runtime.Caching.ObjectCache> class overrides the base <xref:System.Runtime.Caching.ObjectCache.CreateCacheEntryChangeMonitor%2A> method, the cache implementation must create a <xref:System.Runtime.Caching.CacheEntryChangeMonitor> object. This specialized change monitor notifies callers when there are changes to the cache entries that are specified in the `keys` parameter. For example, if a monitored item in the `keys` parameter is updated or removed from the cache, the change monitor created by this method triggers an event.
If a cache implementation supports named cache regions, a string value can be specified as the `regionName` parameter. Otherwise, the parameter defaults to `null`.
> [!NOTE]
> Not all cache implementations support cache-entry change monitors. To determine whether your cache implementation supports <xref:System.Runtime.Caching.CacheEntryChangeMonitor> objects, see the documentation for the specific cache implementation.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="DefaultCacheCapabilities">
<MemberSignature Language="C#" Value="public abstract System.Runtime.Caching.DefaultCacheCapabilities DefaultCacheCapabilities { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Runtime.Caching.DefaultCacheCapabilities DefaultCacheCapabilities" />
<MemberSignature Language="DocId" Value="P:System.Runtime.Caching.ObjectCache.DefaultCacheCapabilities" />
<MemberSignature Language="VB.NET" Value="Public MustOverride ReadOnly Property DefaultCacheCapabilities As DefaultCacheCapabilities" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; abstract property System::Runtime::Caching::DefaultCacheCapabilities DefaultCacheCapabilities { System::Runtime::Caching::DefaultCacheCapabilities get(); };" />
<MemberSignature Language="F#" Value="member this.DefaultCacheCapabilities : System.Runtime.Caching.DefaultCacheCapabilities" Usage="System.Runtime.Caching.ObjectCache.DefaultCacheCapabilities" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Runtime.Caching.DefaultCacheCapabilities</ReturnType>
</ReturnValue>
<Docs>
<summary>When overridden in a derived class, gets a description of the features that a cache implementation provides.</summary>
<value>A bitwise combination of flags that indicate the default capabilities of a cache implementation.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Get">
<MemberSignature Language="C#" Value="public abstract object Get (string key, string regionName = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance object Get(string key, string regionName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.Get(System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function Get (key As String, Optional regionName As String = null) As Object" />
<MemberSignature Language="F#" Value="abstract member Get : string * string -&gt; obj" Usage="objectCache.Get (key, regionName)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
<Parameter Name="regionName" Type="System.String" />
</Parameters>
<Docs>
<param name="key">A unique identifier for the cache entry to get.</param>
<param name="regionName">Optional. A named region in the cache to which the cache entry was added, if regions are implemented. The default value for the optional parameter is <see langword="null" />.</param>
<summary>When overridden in a derived class, gets the specified cache entry from the cache as an object.</summary>
<returns>The cache entry that is identified by <paramref name="key" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetCacheItem">
<MemberSignature Language="C#" Value="public abstract System.Runtime.Caching.CacheItem GetCacheItem (string key, string regionName = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Runtime.Caching.CacheItem GetCacheItem(string key, string regionName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.GetCacheItem(System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function GetCacheItem (key As String, Optional regionName As String = null) As CacheItem" />
<MemberSignature Language="F#" Value="abstract member GetCacheItem : string * string -&gt; System.Runtime.Caching.CacheItem" Usage="objectCache.GetCacheItem (key, regionName)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Runtime.Caching.CacheItem</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
<Parameter Name="regionName" Type="System.String" />
</Parameters>
<Docs>
<param name="key">A unique identifier for the cache entry to get.</param>
<param name="regionName">Optional. A named region in the cache to which the cache was added, if regions are implemented. Because regions are not implemented in [!INCLUDE[net_v40_short](~/includes/net-v40-short-md.md)], the default is <see langword="null" />.</param>
<summary>When overridden in a derived class, gets the specified cache entry from the cache as a <see cref="T:System.Runtime.Caching.CacheItem" /> instance.</summary>
<returns>The cache entry that is identified by <paramref name="key" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method overload exists because some cache implementations might extend the <xref:System.Runtime.Caching.CacheItem> class. In that case, the <xref:System.Runtime.Caching.ObjectCache.Get%28System.String%2CSystem.String%29> method overload will not necessarily return all the information about cached data. However, the <xref:System.Runtime.Caching.ObjectCache.GetCacheItem%28System.String%2CSystem.String%29> method overload enables custom caches to return more than just the cache value.
The <xref:System.Runtime.Caching.ObjectCache.GetCacheItem%28System.String%2CSystem.String%29> method is like the <xref:System.Runtime.Caching.ObjectCache.Get%28System.String%2CSystem.String%29> method, except that the <xref:System.Runtime.Caching.ObjectCache.GetCacheItem%28System.String%2CSystem.String%29> method returns return the cache entry as a <xref:System.Runtime.Caching.CacheItem> instance.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetCount">
<MemberSignature Language="C#" Value="public abstract long GetCount (string regionName = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int64 GetCount(string regionName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.GetCount(System.String)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function GetCount (Optional regionName As String = null) As Long" />
<MemberSignature Language="F#" Value="abstract member GetCount : string -&gt; int64" Usage="objectCache.GetCount regionName" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int64</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="regionName" Type="System.String" />
</Parameters>
<Docs>
<param name="regionName">Optional. A named region in the cache for which the cache entry count should be computed, if regions are implemented. The default value for the optional parameter is <see langword="null" />.</param>
<summary>When overridden in a derived class, gets the total number of cache entries in the cache.</summary>
<returns>The number of cache entries in the cache. If <paramref name="regionName" /> is not <see langword="null" />, the count indicates the number of entries that are in the specified cache region.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetEnumerator">
<MemberSignature Language="C#" Value="protected abstract System.Collections.Generic.IEnumerator&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt; GetEnumerator ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance class System.Collections.Generic.IEnumerator`1&lt;valuetype System.Collections.Generic.KeyValuePair`2&lt;string, object&gt;&gt; GetEnumerator() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.GetEnumerator" />
<MemberSignature Language="VB.NET" Value="Protected MustOverride Function GetEnumerator () As IEnumerator(Of KeyValuePair(Of String, Object))" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; abstract System::Collections::Generic::IEnumerator&lt;System::Collections::Generic::KeyValuePair&lt;System::String ^, System::Object ^&gt;&gt; ^ GetEnumerator();" />
<MemberSignature Language="F#" Value="abstract member GetEnumerator : unit -&gt; System.Collections.Generic.IEnumerator&lt;System.Collections.Generic.KeyValuePair&lt;string, obj&gt;&gt;" Usage="objectCache.GetEnumerator " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.Generic.IEnumerable`1.GetEnumerator</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IEnumerator&lt;System.Collections.Generic.KeyValuePair&lt;System.String,System.Object&gt;&gt;</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>When overridden in a derived class, creates an enumerator that can be used to iterate through a collection of cache entries.</summary>
<returns>The enumerator object that provides access to the cache entries in the cache.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Cache implementers can override and extend this method to provide a custom means of iterating through a collection of cache entries.
> [!NOTE]
> Returning an enumerator is typically a more expensive operation than returning the entire cache entry.
This method is called by the explicit interface implementations that the <xref:System.Runtime.Caching.ObjectCache> class has for the <xref:System.Collections.IEnumerable.GetEnumerator%2A> and <xref:System.Collections.Generic.IEnumerable%601.GetEnumerator%2A> methods.
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="GetValues">
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Gets a set of cache entries.</summary>
</Docs>
</MemberGroup>
<Member MemberName="GetValues">
<MemberSignature Language="C#" Value="public abstract System.Collections.Generic.IDictionary&lt;string,object&gt; GetValues (System.Collections.Generic.IEnumerable&lt;string&gt; keys, string regionName = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Collections.Generic.IDictionary`2&lt;string, object&gt; GetValues(class System.Collections.Generic.IEnumerable`1&lt;string&gt; keys, string regionName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.GetValues(System.Collections.Generic.IEnumerable{System.String},System.String)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function GetValues (keys As IEnumerable(Of String), Optional regionName As String = null) As IDictionary(Of String, Object)" />
<MemberSignature Language="F#" Value="abstract member GetValues : seq&lt;string&gt; * string -&gt; System.Collections.Generic.IDictionary&lt;string, obj&gt;" Usage="objectCache.GetValues (keys, regionName)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IDictionary&lt;System.String,System.Object&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="keys" Type="System.Collections.Generic.IEnumerable&lt;System.String&gt;" />
<Parameter Name="regionName" Type="System.String" />
</Parameters>
<Docs>
<param name="keys">A collection of unique identifiers for the cache entries to get.</param>
<param name="regionName">Optional. A named region in the cache to which the cache entry or entries were added, if regions are implemented. The default value for the optional parameter is <see langword="null" />.</param>
<summary>When overridden in a derived class, gets a set of cache entries that correspond to the specified keys.</summary>
<returns>A dictionary of key/value pairs that represent cache entries.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Runtime.Caching.ObjectCache.GetValues%28System.Collections.Generic.IEnumerable%7BSystem.String%7D%2CSystem.String%29> method overload is a performance optimization for distributed caches that support fetching multiple cache entries from the cache during a single network call.
Although a caller can pass one or more keys to the method, there is no guarantee that all keys represent entries in the cache. Therefore, the returned dictionary might contain fewer items than the number of keys that were passed to the method.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetValues">
<MemberSignature Language="C#" Value="public virtual System.Collections.Generic.IDictionary&lt;string,object&gt; GetValues (string regionName, params string[] keys);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Collections.Generic.IDictionary`2&lt;string, object&gt; GetValues(string regionName, string[] keys) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.GetValues(System.String,System.String[])" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetValues (regionName As String, ParamArray keys As String()) As IDictionary(Of String, Object)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual System::Collections::Generic::IDictionary&lt;System::String ^, System::Object ^&gt; ^ GetValues(System::String ^ regionName, ... cli::array &lt;System::String ^&gt; ^ keys);" />
<MemberSignature Language="F#" Value="abstract member GetValues : string * string[] -&gt; System.Collections.Generic.IDictionary&lt;string, obj&gt;&#xA;override this.GetValues : string * string[] -&gt; System.Collections.Generic.IDictionary&lt;string, obj&gt;" Usage="objectCache.GetValues (regionName, keys)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Collections.Generic.IDictionary&lt;System.String,System.Object&gt;</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="regionName" Type="System.String" />
<Parameter Name="keys" Type="System.String[]">
<Attributes>
<Attribute FrameworkAlternate="dotnet-plat-ext-2.1">
<AttributeName>System.ParamArray</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<param name="regionName">Optional. A named region in the cache to which the cache entry or entries were added, if regions are implemented. Because regions are not implemented in [!INCLUDE[net_v40_short](~/includes/net-v40-short-md.md)], the default is <see langword="null" />.</param>
<param name="keys">A collection of unique identifiers for the cache entries to get.</param>
<summary>Gets a set of cache entries that correspond to the specified keys.</summary>
<returns>A dictionary of key/value pairs that represent cache entries.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Runtime.Caching.ObjectCache.GetValues%2A?displayProperty=nameWithType> method overload is like the <xref:System.Runtime.Caching.ObjectCache.GetValues%28System.Collections.Generic.IEnumerable%7BSystem.String%7D%2CSystem.String%29> method overload, but lets you pass the named region by using optional parameter syntax that is supported by managed languages such as C#.
This method is a virtual method because the <xref:System.Runtime.Caching.ObjectCache> class provides a default implementation that passes the `params` array to the <xref:System.Runtime.Caching.ObjectCache.GetValues%28System.Collections.Generic.IEnumerable%7BSystem.String%7D%2CSystem.String%29> method overload.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Host">
<MemberSignature Language="C#" Value="public static IServiceProvider Host { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property class System.IServiceProvider Host" />
<MemberSignature Language="DocId" Value="P:System.Runtime.Caching.ObjectCache.Host" />
<MemberSignature Language="VB.NET" Value="Public Shared Property Host As IServiceProvider" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static property IServiceProvider ^ Host { IServiceProvider ^ get(); void set(IServiceProvider ^ value); };" />
<MemberSignature Language="F#" Value="member this.Host : IServiceProvider with get, set" Usage="System.Runtime.Caching.ObjectCache.Host" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>get: System.Security.SecurityCritical</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>set: System.Security.SecurityCritical</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.IServiceProvider</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a reference to a managed hosting environment that is available to <see cref="T:System.Runtime.Caching.ObjectCache" /> implementations and that can provide host-specific services to <see cref="T:System.Runtime.Caching.ObjectCache" /> implementations.</summary>
<value>A reference to a cache-aware managed hosting environment.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Runtime.Caching.ObjectCache.Host%2A> property is intended for use by [!INCLUDE[dnprdnshort](~/includes/dnprdnshort-md.md)] host environments and by cache implementations that implement behavior that depends on the .NET Framework host environment.
The following table lists the set of host environment services that might be available from a managed hosting environment and that are available to <xref:System.Runtime.Caching.ObjectCache> implementations through the <xref:System.Runtime.Caching.ObjectCache.Host%2A> property:
|Service|Description|
|-------------|-----------------|
|<xref:System.Runtime.Caching.Hosting.IApplicationIdentifier>|Lets host environments provide application domain identifiers that might be needed by a cache implementation for features such as identifying performance counters.|
|<xref:System.Runtime.Caching.Hosting.IFileChangeNotificationSystem>|Lets host environments provide a custom file-change notification system, instead of using the one provided in the [!INCLUDE[dnprdnshort](~/includes/dnprdnshort-md.md)].|
|<xref:System.Runtime.Caching.Hosting.IMemoryCacheManager>|Lets cache implementations report cache memory consumption to the host environment. This enables host environments to centrally manage memory consumption across multiple cache implementations.|
> [!NOTE]
> Callers of this property value require unrestricted code access security permissions.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">The value being assigned to the property is <see langword="null" />.</exception>
<exception cref="T:System.InvalidOperationException">An attempt was made to set the property value more than one time.</exception>
<permission cref="F:System.Security.Permissions.SecurityAction.Demand">for full trust for all accessors of this property. This property cannot be used by partially trusted code.</permission>
</Docs>
</Member>
<Member MemberName="InfiniteAbsoluteExpiration">
<MemberSignature Language="C#" Value="public static readonly DateTimeOffset InfiniteAbsoluteExpiration;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly valuetype System.DateTimeOffset InfiniteAbsoluteExpiration" />
<MemberSignature Language="DocId" Value="F:System.Runtime.Caching.ObjectCache.InfiniteAbsoluteExpiration" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly InfiniteAbsoluteExpiration As DateTimeOffset " />
<MemberSignature Language="C++ CLI" Value="public: static initonly DateTimeOffset InfiniteAbsoluteExpiration;" />
<MemberSignature Language="F#" Value=" staticval mutable InfiniteAbsoluteExpiration : DateTimeOffset" Usage="System.Runtime.Caching.ObjectCache.InfiniteAbsoluteExpiration" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.DateTimeOffset</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates that a cache entry has no absolute expiration.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A cache entry that is inserted into the cache with the <xref:System.Runtime.Caching.ObjectCache.InfiniteAbsoluteExpiration> field value set as the expiration value should never expire based on an absolute point in time. However, a cache entry with this setting can be evicted from the cache for other reasons that are determined by a particular cache implementation, such as a change-monitor event eviction caused by memory pressure.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Item">
<MemberSignature Language="C#" Value="public abstract object this[string key] { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance object Item(string)" />
<MemberSignature Language="DocId" Value="P:System.Runtime.Caching.ObjectCache.Item(System.String)" />
<MemberSignature Language="VB.NET" Value="Default Public MustOverride Property Item(key As String) As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; abstract property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ key); void set(System::String ^ key, System::Object ^ value); };" />
<MemberSignature Language="F#" Value="member this.Item(string) : obj with get, set" Usage="System.Runtime.Caching.ObjectCache.Item" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
</Parameters>
<Docs>
<param name="key">A unique identifier for a cache entry in the cache.</param>
<summary>Gets or sets the default indexer for the <see cref="T:System.Runtime.Caching.ObjectCache" /> class.</summary>
<value>A key that serves as an indexer into the cache instance.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The behavior of the set accessor of this property is like the <xref:System.Runtime.Caching.MemoryCache.Set%28System.String%2CSystem.Object%2CSystem.DateTimeOffset%2CSystem.String%29> method. Internally, a cache implementation could set the absolute expiration of the specified value to the <xref:System.Runtime.Caching.ObjectCache.InfiniteAbsoluteExpiration> method. However this behavior is ultimately up to the cache implementation.
The behavior of get accessor is like calling the <xref:System.Collections.Specialized.NameValueCollection.Get%28System.String%29> method and using `null` for the region name.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Name">
<MemberSignature Language="C#" Value="public abstract string Name { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Name" />
<MemberSignature Language="DocId" Value="P:System.Runtime.Caching.ObjectCache.Name" />
<MemberSignature Language="VB.NET" Value="Public MustOverride ReadOnly Property Name As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; abstract property System::String ^ Name { System::String ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Name : string" Usage="System.Runtime.Caching.ObjectCache.Name" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the name of a specific <see cref="T:System.Runtime.Caching.ObjectCache" /> instance.</summary>
<value>The name of a specific cache instance.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Some cache implementations might support multiple instances of the cache that is running in a single application. This property lets cache implementers return a name that identifies a specific cache instance.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="NoSlidingExpiration">
<MemberSignature Language="C#" Value="public static readonly TimeSpan NoSlidingExpiration;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly valuetype System.TimeSpan NoSlidingExpiration" />
<MemberSignature Language="DocId" Value="F:System.Runtime.Caching.ObjectCache.NoSlidingExpiration" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly NoSlidingExpiration As TimeSpan " />
<MemberSignature Language="C++ CLI" Value="public: static initonly TimeSpan NoSlidingExpiration;" />
<MemberSignature Language="F#" Value=" staticval mutable NoSlidingExpiration : TimeSpan" Usage="System.Runtime.Caching.ObjectCache.NoSlidingExpiration" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Docs>
<summary>Indicates that a cache entry has no sliding expiration time.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Expiration that is based on duration or a defined window of time is also referred to as sliding expiration. Normally, a cache implementation that evicts items that are based on sliding expiration will remove an item that has not been accessed in the specified window of time.
A cache entry that is inserted into the cache with the <xref:System.Runtime.Caching.ObjectCache.NoSlidingExpiration> field value set as the expiration value should never be evicted because of non-activity in a sliding time window. However, a cache item can be evicted if it has an absolute expiration, or if some other eviction event occurs, such a change monitor or memory pressure.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Remove">
<MemberSignature Language="C#" Value="public abstract object Remove (string key, string regionName = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance object Remove(string key, string regionName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.Remove(System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function Remove (key As String, Optional regionName As String = null) As Object" />
<MemberSignature Language="F#" Value="abstract member Remove : string * string -&gt; obj" Usage="objectCache.Remove (key, regionName)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
<Parameter Name="regionName" Type="System.String" />
</Parameters>
<Docs>
<param name="key">A unique identifier for the cache entry.</param>
<param name="regionName">Optional. A named region in the cache to which the cache entry was added, if regions are implemented. The default value for the optional parameter is <see langword="null" />.</param>
<summary>When overridden in a derived class, removes the cache entry from the cache.</summary>
<returns>An object that represents the value of the removed cache entry that was specified by the key, or <see langword="null" /> if the specified entry was not found.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If you override this method in a custom cache implementation, if there is a cache entry in the cache that corresponds to `key`, the value of the removed item should be returned. If nothing was removed from the cache, the method should return `null`.
> [!NOTE]
> Some distributed cache implementations might not support the ability to return the value that was removed from the cache. This might be because the cache implementation does not support returning the value of a removed cache item. It might also be because marshaling the object as a return value is too expensive. In such cases, cache implementations can return `null`.
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="Set">
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>When overridden in a derived class, inserts a cache entry into the cache.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The typical behavior of the <xref:System.Runtime.Caching.ObjectCache.Set%2A> overload methods is an insert-or-update operation. A cache entry is either inserted as a new entry if the specified entry does not exist, or the cache entry is updated with a new value if it already exists.
]]></format>
</remarks>
</Docs>
</MemberGroup>
<Member MemberName="Set">
<MemberSignature Language="C#" Value="public abstract void Set (System.Runtime.Caching.CacheItem item, System.Runtime.Caching.CacheItemPolicy policy);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Set(class System.Runtime.Caching.CacheItem item, class System.Runtime.Caching.CacheItemPolicy policy) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.Set(System.Runtime.Caching.CacheItem,System.Runtime.Caching.CacheItemPolicy)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Sub Set (item As CacheItem, policy As CacheItemPolicy)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; abstract void Set(System::Runtime::Caching::CacheItem ^ item, System::Runtime::Caching::CacheItemPolicy ^ policy);" />
<MemberSignature Language="F#" Value="abstract member Set : System.Runtime.Caching.CacheItem * System.Runtime.Caching.CacheItemPolicy -&gt; unit" Usage="objectCache.Set (item, policy)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="item" Type="System.Runtime.Caching.CacheItem" />
<Parameter Name="policy" Type="System.Runtime.Caching.CacheItemPolicy" />
</Parameters>
<Docs>
<param name="item">The cache item to add.</param>
<param name="policy">An object that contains eviction details for the cache entry. This object provides more options for eviction than a simple absolute expiration.</param>
<summary>When overridden in a derived class, inserts the cache entry into the cache as a <see cref="T:System.Runtime.Caching.CacheItem" /> instance, specifying information about how the entry will be evicted.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the key for `item` does not exist, `item` is inserted as a new cache entry. If an item with a key that matches `item` exists, the value from `item` is used to update or overwrite the value of the existing cache entry.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Set">
<MemberSignature Language="C#" Value="public abstract void Set (string key, object value, DateTimeOffset absoluteExpiration, string regionName = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Set(string key, object value, valuetype System.DateTimeOffset absoluteExpiration, string regionName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.Set(System.String,System.Object,System.DateTimeOffset,System.String)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Sub Set (key As String, value As Object, absoluteExpiration As DateTimeOffset, Optional regionName As String = null)" />
<MemberSignature Language="F#" Value="abstract member Set : string * obj * DateTimeOffset * string -&gt; unit" Usage="objectCache.Set (key, value, absoluteExpiration, regionName)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
<Parameter Name="value" Type="System.Object" />
<Parameter Name="absoluteExpiration" Type="System.DateTimeOffset" />
<Parameter Name="regionName" Type="System.String" />
</Parameters>
<Docs>
<param name="key">A unique identifier for the cache entry.</param>
<param name="value">The object to insert.</param>
<param name="absoluteExpiration">The fixed date and time at which the cache entry will expire.</param>
<param name="regionName">Optional. A named region in the cache to which the cache entry can be added, if regions are implemented. The default value for the optional parameter is <see langword="null" />.</param>
<summary>When overridden in a derived class, inserts a cache entry into the cache, specifying time-based expiration details.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If an item that matches `key` does not exist in the cache, `value` and `key` are used to insert as a new cache entry. If an item with a key that matches `item` exists, the cache entry is updated or overwritten by using `value`.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Set">
<MemberSignature Language="C#" Value="public abstract void Set (string key, object value, System.Runtime.Caching.CacheItemPolicy policy, string regionName = null);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Set(string key, object value, class System.Runtime.Caching.CacheItemPolicy policy, string regionName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.Set(System.String,System.Object,System.Runtime.Caching.CacheItemPolicy,System.String)" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Sub Set (key As String, value As Object, policy As CacheItemPolicy, Optional regionName As String = null)" />
<MemberSignature Language="F#" Value="abstract member Set : string * obj * System.Runtime.Caching.CacheItemPolicy * string -&gt; unit" Usage="objectCache.Set (key, value, policy, regionName)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.String" />
<Parameter Name="value" Type="System.Object" />
<Parameter Name="policy" Type="System.Runtime.Caching.CacheItemPolicy" />
<Parameter Name="regionName" Type="System.String" />
</Parameters>
<Docs>
<param name="key">A unique identifier for the cache entry.</param>
<param name="value">The object to insert.</param>
<param name="policy">An object that contains eviction details for the cache entry. This object provides more options for eviction than a simple absolute expiration.</param>
<param name="regionName">Optional. A named region in the cache to which the cache entry can be added, if regions are implemented. The default value for the optional parameter is <see langword="null" />.</param>
<summary>When overridden in a derived class, inserts a cache entry into the cache.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method overload lets you provide more eviction or expiration details than those that are available in time-based absolute expiration.
If an item that matches `key` does not exist in the cache, `value` and `key` are used to insert as a new cache entry. If an item with a key that matches `item` exists, the cache entry is updated or overwritten by using `value`.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.Collections.Generic.IEnumerable&lt;System.Collections.Generic.KeyValuePair&lt;System.String,System.Object&gt;&gt;.GetEnumerator">
<MemberSignature Language="C#" Value="System.Collections.Generic.IEnumerator&lt;System.Collections.Generic.KeyValuePair&lt;string,object&gt;&gt; IEnumerable&lt;KeyValuePair&lt;string,object&gt;&gt;.GetEnumerator ();" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance class System.Collections.Generic.IEnumerator`1&lt;valuetype System.Collections.Generic.KeyValuePair`2&lt;string, object&gt;&gt; System.Collections.Generic.IEnumerable&lt;System.Collections.Generic.KeyValuePair&lt;System.String,System.Object&gt;&gt;.GetEnumerator() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.System#Collections#Generic#IEnumerable&lt;System#Collections#Generic#KeyValuePair&lt;System#String,System#Object&gt;&gt;#GetEnumerator" />
<MemberSignature Language="VB.NET" Value="Function GetEnumerator () As IEnumerator(Of KeyValuePair(Of String, Object)) Implements IEnumerable(Of KeyValuePair(Of String, Object)).GetEnumerator" />
<MemberSignature Language="C++ CLI" Value=" virtual System::Collections::Generic::IEnumerator&lt;System::Collections::Generic::KeyValuePair&lt;System::String ^, System::Object ^&gt;&gt; ^ System.Collections.Generic.IEnumerable&lt;System.Collections.Generic.KeyValuePair&lt;System.String,System.Object&gt;&gt;.GetEnumerator() = System::Collections::Generic::IEnumerable&lt;System::Collections::Generic::KeyValuePair&lt;System::String ^, System::Object ^&gt;&gt;::GetEnumerator;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.Generic.IEnumerable`1.GetEnumerator</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Collections.Generic.IEnumerator&lt;System.Collections.Generic.KeyValuePair&lt;System.String,System.Object&gt;&gt;</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Supports iteration over a strongly typed collection.</summary>
<returns>The enumerator object that provides access to the cache entries in the cache.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="System.Collections.IEnumerable.GetEnumerator">
<MemberSignature Language="C#" Value="System.Collections.IEnumerator IEnumerable.GetEnumerator ();" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance class System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.Caching.ObjectCache.System#Collections#IEnumerable#GetEnumerator" />
<MemberSignature Language="VB.NET" Value="Function GetEnumerator () As IEnumerator Implements IEnumerable.GetEnumerator" />
<MemberSignature Language="C++ CLI" Value=" virtual System::Collections::IEnumerator ^ System.Collections.IEnumerable.GetEnumerator() = System::Collections::IEnumerable::GetEnumerator;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IEnumerable.GetEnumerator</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IEnumerator</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Supports iteration over a generic collection.</summary>
<returns>The enumerator object that provides access to the items in the cache.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when a derived <xref:System.Runtime.Caching.ObjectCache> instance is cast to an <xref:System.Collections.IEnumerable> interface.
Developers can use this method to iterate through a generic collection of cache entries.
This is the default <xref:System.Collections.IEnumerable.GetEnumerator%2A> implementation that internally calls the <xref:System.Runtime.Caching.ObjectCache.GetEnumerator%2A> method.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.