Class CachingOptions
Provides the user to configure different options that can be set while caching a certain item/result set.
Inheritance
Namespace:
Assembly: cs.temp.dll.dll
Syntax
public class CachingOptions : ICloneable
Name | Description |
---|---|
CachingOptions() | Creates an instance of CachingOptions with default values. |
Name | Description |
---|---|
AbsoluteExpirationTime | Returns the absolute time when the item will expire. |
CreateDbDependency | Specifies whether to create a database dependency with the result set or not. |
ExpirationType | Returns the configured expiration type. |
IsSyncEnabled | Returns that CacheSync Option is Enabled or Disabled |
Priority | Specifies the priority of the item. Low priority items are evicted first when eviction triggers. By default the priority is Default. |
QueryIdentifier | Identifier for a query which is added as a string against the result set of the query in cache. This MUST be unique for each unique query. QueryIdentifier is used to regenerate the result set from the cache upon execution of the same query again. The user must maintain a mapping of the query against the query identifier to be used in the future. If not specified, NCache adds the query string itself as the string (making it unique for each unique query). For example, a query which returns a Customer if user provides QueryIdentifier then items will be stored against the key generated using QueryIdentifier in the cache. if user do not provide QueryIdentifier then we generate key using the query |
ReadThruProvider | Returns ReadThru Provider name that is configured for Cache Synchronization |
SlidingExpirationTime | Returns the sliding expiration time span of the item that will be cached. |
StoreAs | Specifies whether the result set should be stored as seperate entities or as a collection. |
Name | Description |
---|---|
Clone() | Creates a shallow copy of this instance. |
SetAbsoluteExpiration(DateTime) | Sets the absolute expiration time of the caching item. Only one type of expiration, either absoute expiration or sliding expiration, can be configured at one time. |
SetResyncProviderName(String) | Enable Resync item on expiration property and set resync provider name for readthru provider |
SetSlidingExpiration(TimeSpan) | Sets the sliding expiration time of the caching item. Only one type of expiration, either absoute expiration or sliding expiration, can be configured at one time. |