IModelCacheKeyFactory Interface

Definition

Creates keys that uniquely identifies the model for a given context. This is used to store and lookup a cached model for a given context.

public interface IModelCacheKeyFactory
type IModelCacheKeyFactory = interface
Public Interface IModelCacheKeyFactory
Derived

Remarks

The service lifetime is Singleton. This means a single instance is used by many DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.

See EF Core model caching for more information and examples.

Methods

Create(DbContext)
Obsolete.

Gets the model cache key for a given context.

Create(DbContext, Boolean)

Gets the model cache key for a given context.

Applies to