public void Add(string cacheKey, object cacheValue, TimeSpan expiration, bool isNeedToNotify = false) { _remoteCache.Set(cacheKey, cacheValue, expiration); if (isNeedToNotify) { _cachePublisher.Notify(NotifyType.Add, cacheKey, cacheValue, expiration); } }
// TODO: This method or some method should be triggered by developer(user) indirectly... public void OnBeforeSet(string key, InMemoryCacheItem item) { _logger.Log(LogLevel.Trace, string.Format("GreatEagle OnBeforeSet {0}", key)); _remoteCacheProvider.Set(key, item, item.GetExpireTimeSpan()); //TODO: Create temp remote cache item to make wait tribe for current member }