Example #1
0
        public IUpdateable <T> RemoveDataCache()
        {
            var cacheService = this.Context.CurrentConnectionConfig.ConfigureExternalServices.DataInfoCacheService;

            CacheSchemeMain.RemoveCache(cacheService, this.Context.EntityMaintenance.GetTableName <T>());
            return(this);
        }
Example #2
0
 public void RemoveDataCache(string likeString)
 {
     if (Servie == null)
     {
         return;
     }
     CacheSchemeMain.RemoveCacheByLike(Servie, likeString);
 }
Example #3
0
 public IUpdateable <T> RemoveDataCache(string likeString)
 {
     this.RemoveCacheFunc = () =>
     {
         var cacheService = this.Context.CurrentConnectionConfig.ConfigureExternalServices.DataInfoCacheService;
         CacheSchemeMain.RemoveCacheByLike(cacheService, likeString);
     };
     return(this);
 }
Example #4
0
 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);
         }
     }
 }