public IDeleteable <T> RemoveDataCache() { this.RemoveCacheFunc = () => { var cacheService = this.Context.CurrentConnectionConfig.ConfigureExternalServices.DataInfoCacheService; CacheSchemeMain.RemoveCache(cacheService, this.Context.EntityMaintenance.GetTableName <T>()); }; return(this); }
private void RemoveCache() { if (!string.IsNullOrEmpty(CacheKey) || !string.IsNullOrEmpty(CacheKeyLike)) { Check.Exception(this.context.CurrentConnectionConfig.ConfigureExternalServices?.DataInfoCacheService == null, "ConnectionConfig.ConfigureExternalServices.DataInfoCacheService is null"); var service = this.context.CurrentConnectionConfig.ConfigureExternalServices?.DataInfoCacheService; if (!string.IsNullOrEmpty(CacheKey)) { CacheSchemeMain.RemoveCache(service, CacheKey); } if (!string.IsNullOrEmpty(CacheKeyLike)) { CacheSchemeMain.RemoveCacheByLike(service, CacheKeyLike); } } }