CompiledQueryCacheKeyGenerator CompiledQueryCacheKeyGenerator Class

Definition

Creates keys that uniquely identifies a query. This is used to store and lookup compiled versions of a query in a cache.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public class CompiledQueryCacheKeyGenerator : ICompiledQueryCacheKeyGenerator
Public Class CompiledQueryCacheKeyGenerator
    Implements ICompiledQueryCacheKeyGenerator
Inheritance
System.ObjectSystem.Object
CompiledQueryCacheKeyGeneratorCompiledQueryCacheKeyGenerator
Implements

Inherited Members

System.Object

System.Object.ToString()System.Object.ToString()
System.Object.Equals(System.Object)System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()System.Object.GetHashCode()
System.Object.GetType()System.Object.GetType()
System.Object.MemberwiseClone()System.Object.MemberwiseClone()

Constructors

CompiledQueryCacheKeyGenerator(IModel, ICurrentDbContext) CompiledQueryCacheKeyGenerator(IModel, ICurrentDbContext)

Initializes a new instance of the CompiledQueryCacheKeyGenerator class.

public CompiledQueryCacheKeyGenerator(IModel model, ICurrentDbContext currentContext)
Public Sub New(model As IModel, currentContext As ICurrentDbContext)
Parameters
model
IModel IModel

The model that queries will be written against.

currentContext
ICurrentDbContext ICurrentDbContext

The context that queries will be executed for.

Methods

GenerateCacheKey(Expression, Boolean) GenerateCacheKey(Expression, Boolean)

Generates the cache key for the given query.

public virtual object GenerateCacheKey(Expression query, bool async)
Public Overridable Function GenerateCacheKey(query As Expression, async As Boolean) As Object
Parameters
query
System.Linq.Expressions.Expression System.Linq.Expressions.Expression

The query to get the cache key for.

async
System.Boolean System.Boolean

A value indicating whether the query will be executed asynchronously.

Returns
System.Object System.Object

The cache key.

GenerateCacheKeyCore(Expression, Boolean) GenerateCacheKeyCore(Expression, Boolean)

Generates the cache key for the given query.

protected CompiledQueryCacheKeyGenerator.CompiledQueryCacheKey GenerateCacheKeyCore(Expression query, bool async)
Protected Function GenerateCacheKeyCore(query As Expression, async As Boolean) As CompiledQueryCacheKeyGenerator.CompiledQueryCacheKey
Parameters
query
System.Linq.Expressions.Expression System.Linq.Expressions.Expression

The query to get the cache key for.

async
System.Boolean System.Boolean

A value indicating whether the query will be executed asynchronously.

Returns