Class RemoteCacheSynchronization
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Default implementation of the synchronized object cache.
Inheritance
Inherited Members
Namespace: EPiServer.Events.Internal
Assembly: EPiServer.Events.dll
Version: 11.20.7Syntax
[ServiceConfiguration(typeof(ISynchronizedObjectInstanceCache), Lifecycle = ServiceInstanceScope.Singleton)]
public class RemoteCacheSynchronization : ISynchronizedObjectInstanceCache, IObjectInstanceCache
Remarks
Will wrap an existing IObjectInstanceCache and provide synchronization across multiple computers, using the remote event system.
Constructors
RemoteCacheSynchronization(IObjectInstanceCache)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the RemoteCacheSynchronization class.
Declaration
public RemoteCacheSynchronization(IObjectInstanceCache localCache)
Parameters
Type | Name | Description |
---|---|---|
IObjectInstanceCache | localCache | The local cache instance to extend with remote synchronization support. |
RemoteCacheSynchronization(IObjectInstanceCache, IEventRegistry)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the RemoteCacheSynchronization class.
Declaration
public RemoteCacheSynchronization(IObjectInstanceCache localCache, IEventRegistry eventService)
Parameters
Type | Name | Description |
---|---|---|
IObjectInstanceCache | localCache | The local cache instance to extend with remote synchronization support. |
IEventRegistry | eventService | The event service used by this instance to retrieve events. |
Fields
LocalCacheManagerRaiserId
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. The ID of the local cache manager.
Declaration
public static readonly Guid LocalCacheManagerRaiserId
Field Value
Type | Description |
---|---|
System.Guid |
Remarks
Used by the remote event system to identify who originally created an event and determine appropriate action.
RemoveFromCacheEventId
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. The ID used to identify cache removals requested by the cache manager.
Declaration
public static readonly Guid RemoveFromCacheEventId
Field Value
Type | Description |
---|---|
System.Guid |
Properties
ObjectInstanceCache
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the object instance cache used by the synchronized cache implementation.
Declaration
public IObjectInstanceCache ObjectInstanceCache { get; }
Property Value
Type | Description |
---|---|
IObjectInstanceCache | The object instance cache. |
SynchronizationFailedStrategy
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Set the strategy for handling missed synchronization information.
Declaration
public FailureRecoveryAction SynchronizationFailedStrategy { get; set; }
Property Value
Type | Description |
---|---|
FailureRecoveryAction |
Remarks
By default this is set to None, meaning that if we detect a failure in communication with a remote computer, we will simply ignore that error. The potential problem is that we may have stale data in the cache. In most cases stale data is better than aggressively clearing cached data, since clearing the cache can seriously impact a running site.
Methods
Clear()
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Removes all entries from the cache.
Declaration
public void Clear()
Get(String)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the specified object.
Declaration
public object Get(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
Returns
Type | Description |
---|---|
System.Object | The object associated with the key, if it exists. Otherwise returns null. |
Insert(String, Object, CacheEvictionPolicy)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Inserts the value into the cache with the specified key.
Declaration
public void Insert(string key, object value, CacheEvictionPolicy evictionPolicy)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
System.Object | value | The value to cache. |
CacheEvictionPolicy | evictionPolicy | The cache eviction policy. |
Remarks
The evicitionPolicy can be null. In that case we have no specific policy as to when or why the object should be removed from the cache. I e it may remain in the cache indefinitely.
Remove(String)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Removes the specified object.
Declaration
public void Remove(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
RemoveLocal(String)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Removes the object instance from the local cache.
Declaration
public void RemoveLocal(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the cached object. |
RemoveRemote(String)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Removes the object instance from remote cache locations.
Declaration
public void RemoveRemote(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the cached object. |