IModelCacheKeyFactory Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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, Boolean) |
Gets the model cache key for a given context. |
Create(DbContext) |
Obsolete.
Gets the model cache key for a given context. |
Applies to
Entity Framework