Ejemplo n.º 1
0
        public void Refresh(CacheType cacheType)
        {
            var cache = cacheContainer.GetCache(cacheType);

            cache.InvalidateData();

            // Ensuring that the GitLock cache is kept up to date
            cacheContainer.GetCache(CacheType.GitLocks).ValidateData();
        }
Ejemplo n.º 2
0
        public void Refresh(CacheType cacheType)
        {
            var cache = cacheContainer.GetCache(cacheType);

            cache.InvalidateData();

            // take the opportunity to possibly refresh the locks cache, if it has timed out
            if (cacheType != CacheType.GitLocks)
            {
                cacheContainer.GetCache(CacheType.GitLocks).ValidateData();
            }
        }
Ejemplo n.º 3
0
        private bool InvalidationFailed(Exception ex)
        {
            Logger.Warning(ex, "Error invalidating user cache");
            var managedCache = cacheContainer.GetCache(CacheType.GitUser);

            managedCache.ResetInvalidation();
            return(false);
        }
Ejemplo n.º 4
0
 private void RefreshCache(CacheType cacheType)
 {
     taskManager.RunInUI(() =>
     {
         var cache = cacheContainer.GetCache(cacheType);
         // if the cache has valid data, we need to force an invalidation to refresh it
         // if it doesn't have valid data, it will trigger an invalidation automatically
         if (cache.ValidateData())
         {
             cache.InvalidateData();
         }
     });
 }
Ejemplo n.º 5
0
        public void Refresh(CacheType cacheType)
        {
            var cache = cacheContainer.GetCache(cacheType);

            cache.InvalidateData();
        }