0

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);
Olaf Kock
  • 46,930
  • 8
  • 59
  • 90
csharpdev
  • 137
  • 6

1 Answers1

1

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

Stephen Darlington
  • 51,577
  • 12
  • 107
  • 152