Class DbCachingPolicy
Default caching policy implementation: everything is cached with ReadWrite, no expiration.
Inheritance
System.Object
DbCachingPolicy
Implements
Namespace: Apache.Ignite.EntityFramework
Assembly: Apache.Ignite.EntityFramework.dll
Syntax
public class DbCachingPolicy : object, 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 |
---|---|
TimeSpan | Expiration timeout. |