remove unnecessary skipcommand since SQLite does not have NEWID

This commit is contained in:
cvium 2022-10-21 15:10:47 +02:00
parent b836fe9685
commit 395efc94a7

View File

@ -25,8 +25,6 @@ public static class ServiceCollectionExtensions
.CacheAllQueries(CacheExpirationMode.Sliding, TimeSpan.FromMinutes(10)) .CacheAllQueries(CacheExpirationMode.Sliding, TimeSpan.FromMinutes(10))
.DisableLogging(true) .DisableLogging(true)
.UseCacheKeyPrefix("EF_") .UseCacheKeyPrefix("EF_")
.SkipCachingCommands(commandText =>
commandText.Contains("NEWID()", StringComparison.InvariantCultureIgnoreCase))
// Don't cache null values. Remove this optional setting if it's not necessary. // Don't cache null values. Remove this optional setting if it's not necessary.
.SkipCachingResults(result => .SkipCachingResults(result =>
result.Value == null || (result.Value is EFTableRows rows && rows.RowsCount == 0))); result.Value == null || (result.Value is EFTableRows rows && rows.RowsCount == 0)));