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.

The service lifetime is Scoped. This means that each DbContext instance will use its own instance of this service. The implementation may depend on other services registered with any lifetime. The implementation does not need to be thread-safe.

C#
public class CompiledQueryCacheKeyGenerator : Microsoft.EntityFrameworkCore.Query.ICompiledQueryCacheKeyGenerator
Inheritance
CompiledQueryCacheKeyGenerator
Derived
Implements

Remarks

See Implementation of database providers and extensions and How EF Core queries work for more information.

Constructors

Properties

Dependencies

Dependencies for this service.

Methods

GenerateCacheKey(Expression, Boolean)

Generates the cache key for the given query.

GenerateCacheKeyCore(Expression, Boolean)

Generates the cache key for the given query.

Applies to

Product Versions
Entity Framework Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0