Class ReplicatedCache<TValue>
Provides a cache than can be replicated in a load balanced environment
Implements
System.IDisposable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Data.Cache
Assembly: EPiServer.Data.dll
Version: 9.12.2Syntax
public class ReplicatedCache<TValue> : LocalCache<string, TValue>, IDisposable
Type Parameters
Name | Description |
---|---|
TValue |
Constructors
ReplicatedCache(String)
Declaration
public ReplicatedCache(string remoteKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | remoteKey |
Methods
Add(String, Boolean, Boolean, Func<TValue>, Boolean)
Creates a new element or overwrites any existing value for the specified key
Declaration
public virtual TValue Add(string key, bool cacheNullValues, bool overwriteExistingValue, Func<TValue> action, bool broadcast)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the value to set |
System.Boolean | cacheNullValues | Specifies if null values returned from the delegate should be stored in the cache |
System.Boolean | overwriteExistingValue | if an existing value in the cache should be updated with the new value, otherwise
|
System.Func<TValue> | action | A delegate to generate the value to set in the cache |
System.Boolean | broadcast | True if the action performed should cause the cache event should be broadcasted |
Returns
Type | Description |
---|---|
TValue | The value generated by the delegate |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Key is null |
Clear()
Declaration
public override void Clear()
Overrides
EPiServer.Data.Cache.LocalCache<System.String, TValue>.Clear()
InternalSet(String, TValue)
Declaration
protected override void InternalSet(string key, TValue value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | |
TValue | value |
Overrides
EPiServer.Data.Cache.LocalCache<System.String, TValue>.InternalSet(System.String, TValue)
Remove(String)
Declaration
public override void Remove(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Overrides
EPiServer.Data.Cache.LocalCache<System.String, TValue>.Remove(System.String)
Implements
System.IDisposable