Class DbCachingPolicy
Default caching policy implementation: everything is cached with ReadWrite, no expiration.
Inheritance
System.Object
DbCachingPolicy
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Apache.Ignite.EntityFramework
Assembly: Apache.Ignite.EntityFramework.dll
Syntax
public class DbCachingPolicy : IDbCachingPolicy
Methods
CanBeCached(DbQueryInfo)
Determines whether the specified query can be cached.
Declaration
public virtual bool CanBeCached(DbQueryInfo queryInfo)
Parameters
Type | Name | Description |
---|---|---|
DbQueryInfo | queryInfo | The query information. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CanBeCached(DbQueryInfo, Int32)
Determines whether specified number of rows should be cached.
Declaration
public virtual bool CanBeCached(DbQueryInfo queryInfo, int rowCount)
Parameters
Type | Name | Description |
---|---|---|
DbQueryInfo | queryInfo | The query information. |
System.Int32 | rowCount | The count of fetched rows. |
Returns
Type | Description |
---|---|
System.Boolean |
GetCachingMode(DbQueryInfo)
Gets the caching strategy for a give query.
Declaration
public virtual DbCachingMode GetCachingMode(DbQueryInfo queryInfo)
Parameters
Type | Name | Description |
---|---|---|
DbQueryInfo | queryInfo | The query information. |
Returns
Type | Description |
---|---|
DbCachingMode | Caching strategy for the query. |
GetExpirationTimeout(DbQueryInfo)
Gets the absolute expiration timeout for a given query.
Declaration
public virtual TimeSpan GetExpirationTimeout(DbQueryInfo queryInfo)
Parameters
Type | Name | Description |
---|---|---|
DbQueryInfo | queryInfo | The query information. |
Returns
Type | Description |
---|---|
System.TimeSpan | Expiration timeout. System.TimeSpan.MaxValue for no expiration. |