/// <summary> /// 事件处理 /// </summary> /// <param name="eventData">事件源数据</param> public override void Handle(DataAuthCacheRefreshEventData eventData) { IDataAuthCache cache = ServiceLocator.Instance.GetService <IDataAuthCache>(); foreach (DataAuthCacheItem cacheItem in eventData.CacheItems) { cache.SetCache(cacheItem); } }
/// <summary> /// 事件处理 /// </summary> /// <param name="eventData">事件源数据</param> public override void Handle(DataAuthCacheRefreshEventData eventData) { //更新缓存项 foreach (DataAuthCacheItem cacheItem in eventData.SetItems) { _authCache.SetCache(cacheItem); } //移除缓存项 foreach (DataAuthCacheItem cacheItem in eventData.RemoveItems) { _authCache.RemoveCache(cacheItem); } }