public void ClearLoginCache() { var clientUserCache = UserCacheManager.GetClientUserCache(Router.NspClientCachePath); clientUserCache.Remove(parentForm.GetEndPoint()); UserCacheManager.SaveChanges(Router.NspClientCachePath, clientUserCache); }
public void CreateLoginCache(string username, string token) { var clientUserCache = UserCacheManager.GetClientUserCache(Router.NspClientCachePath); var item = new ClientUserCacheItem() { UserName = username, Token = token }; clientUserCache[parentForm.GetEndPoint()] = item; UserCacheManager.SaveChanges(Router.NspClientCachePath, clientUserCache); }