Soss.ClientBackingStorePolicy
Namespace: Soss.Client
Assembly: soss_namedcache (in soss_namedcache.dll) Version: 6.2.0.0
The BackingStorePolicy type exposes the following members.
Name | Description | |
---|---|---|
BackingStorePolicy |
Creates a BackingStorePolicy object with all options set to false.
| |
BackingStorePolicy(Boolean, Boolean, Boolean) |
Creates a BackingStorePolicy object.
|
Name | Description | |
---|---|---|
EnableAsyncOperations |
Indicates whether this client will handle asynchronous refresh-ahead/write-behind operations.
| |
EnableReadThrough |
If true, a client will populate the StateServer automatically from a database (or
other type of backing store) when a cache miss occurs by invoking the Load(CachedObjectId)
method.
| |
EnableWriteThrough |
If true, a client will synchronously write changes to a database (or
other type of backing store) when a cached object is updated or created in the cache
by invoking the Store(CachedObjectId, Object)
method.
|
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
The BackingStorePolicy class controls read-through, write-through, refresh-ahead, and write-behind behavior when ScaleOut StateServer is being used as cache for a persistent backing store (such as a database). Use the EnableAsyncOperations property to enable asynchronous refresh-ahead and write-behind operations.
If read-through operations are enabled, it is not desirable for every client process to simultaneously query the database when a cache miss occurs, so the EnableReadThrough property will affect the behavior of the NamedCaches's Retrieve(CachedObjectId, Boolean), Get(CachedObjectId), and ItemCachedObjectId methods when a cache miss occurs. The first client to perform a retrieval operation on an object that's missing from the cache will have its Load(CachedObjectId) implementation invoked. While the backing store is being queried, other clients requesting this object will repeatedly poll until the object has been inserted into the cache. The frequency of the polling behavior is controlled through the NamedCache's ReadPendingRetryInterval and MaxReadThroughPendingAttempts properties.
The EnableWriteThrough property is used to indicate to the StateServer that the client will be performing write-through operations via an implementation of Store(CachedObjectId, Object).
Changing properties of the BackingStorePolicy after a call to SetBackingStoreAdapter(IBackingStore, BackingStorePolicy) will not change the named cache's behavior--SetBackingStoreAdapter(IBackingStore, BackingStorePolicy) must be called again for the new policy options to take effect.