-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Bug description
Hello,
I tried the new named global query filter feature, but it seems to have a problem with query caching when using its corresponding overload of IgnoreQueryFilters:
IgnoreQueryFilters(this IQueryable source, [NotParameterized] IReadOnlyCollection filterKeys)CompiledQueryCacheKeyGenerator.GenerateCacheKey appears to always generate a new key, which leads to cache misses and query recompilation on each call.
This issue does not occur when using the previous overload:
IgnoreQueryFilters(this IQueryable source)Your code
I have a minimal reproduction scenario available [here](https://github.com/WiseGus/ef10_named_filters_cache) using Microsoft.EntityFrameworkCore.Sqlite
Note: It can be reproduced to both Microsoft.EntityFrameworkCore.Sqlite and Microsoft.EntityFrameworkCore.SqlServer.Stack traces
Verbose output
EF Core version
10.0.0-rc.2.25502.107
Database provider
Microsoft.EntityFrameworkCore.Sqlite
Target framework
.NET 10.0
Operating system
Windows 11
IDE
Visual Studio 2026 Insiders 11201.2