0
votes

I have two caches configured in ignite and I need to get the events CacheObjectPut & CacheObjectRemoved specific to one cache. When I tried with the below-mentioned steps, I am getting events for all caches. Let me know how to get the events only for a specific cache?

var cfg = new IgniteConfiguration
{
    IncludedEventTypes = new[]
    {
        EventType.CacheObjectPut,
        EventType.CacheObjectRemoved,
    }
};
var ignite = Ignition.Start(cfg);

var events = ignite.GetEvents();
events.LocalListen(new LocalListener(), EventType.CacheObjectPut,        EventType.CacheObjectRemoved);
1

1 Answers

0
votes

In general, you're better off using Continuous Queries rather than events. CQs also work against a specific cache.