CompiledQueryCacheKeyGenerator CompiledQueryCacheKeyGenerator Class

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.

Syntax

Declaration

public class CompiledQueryCacheKeyGenerator : ICompiledQueryCacheKeyGeneratorPublic Class CompiledQueryCacheKeyGenerator
    Implements ICompiledQueryCacheKeyGenerator

Inheritance Hierarchy

  • System.Object
    System.Object
  • CompiledQueryCacheKeyGenerator
    CompiledQueryCacheKeyGenerator

Inherited Members

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

Constructors summary

Initializes a new instance of the CompiledQueryCacheKeyGenerator class.

Methods summary

Generates the cache key for the given query.

Generates the cache key for the given query.

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

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

Details

Assembly

Microsoft.EntityFrameworkCore.dll