protected override void UpdateCache(CommandResponse result)
 {
     if (result.Success)
     {
         //Cleare user cache
         CacheHandler.Instance.Remove(CachingKey.UserBlocks(_options.UserName));
         CacheHandler.Instance.Remove(CachingKey.UserInformation(_options.UserName));
         CacheHandler.Instance.Remove(CachingKey.UserOverview(_options.UserName));
         CacheHandler.Instance.Remove(CachingKey.UserPreferences(_options.UserName));
         CacheHandler.Instance.Remove(CachingKey.UserSubscriptions(_options.UserName));
         CacheHandler.Instance.Remove(CachingKey.UserData(_options.UserName));
         CacheHandler.Instance.Remove(CachingKey.UserBlocks(_options.UserName));
         CacheHandler.Instance.Remove(CachingKey.UserRecord(_options.UserName));
         //CacheHandler.Instance.Remove(CachingKey.UserSavedItems(_options.UserName));
     }
 }
예제 #2
0
 private void Recache()
 {
     Task.Run(() => CacheHandler.Instance.Replace <UserData>(CachingKey.UserData(UserName), this, TimeSpan.FromMinutes(5)));
 }