public PubSubCache(IPubSub pubSubProvider, string cacheInstanceKey = null) { this.pubSub = pubSubProvider; this.memoryCacheInstance = new MemoryCache(this.pubSub.GetType().Name + (cacheInstanceKey ?? "")); this.subscription = pubSub.CreateEmptySubscription(); this.filter = new InvalidationFilter(); this.subscription.OnMessage += filter.OnMessageReceived; }