db.Fastest & cache

This commit is contained in:
sunkaixuan 2023-10-24 18:05:55 +08:00
parent 2d764f9b67
commit 28f9b36992

View File

@ -302,6 +302,14 @@ namespace SqlSugar
CacheSchemeMain.RemoveCacheByLike(service, CacheKeyLike);
}
}
if (this.context.CurrentConnectionConfig?.MoreSettings?.IsAutoRemoveDataCache == true)
{
var cacheService = this.context.CurrentConnectionConfig?.ConfigureExternalServices?.DataInfoCacheService;
if (cacheService != null)
{
CacheSchemeMain.RemoveCache(cacheService, this.context.EntityMaintenance.GetTableName<T>());
}
}
}
}