diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/FastestProvider/Private.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/FastestProvider/Private.cs index 528782a33..5a2151a1d 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/FastestProvider/Private.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/FastestProvider/Private.cs @@ -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()); + } + } } }