Is it possible to be notified when AppFabric is ev

2019-09-18 20:00发布

问题:

I'm using AppFabric for Windows Server 1.1 with Entity Framework and the Entity Framework Cache Adapter.

Recently, for one of our customer, we encountered memory pressure on one of the cache node. AppFabric Cache started evicting least recently used objects.

The problem is that the Entity Framework Cache Adapter stores objects in dependent regions. So if a region is cleared or removed by AppFabric, the cache adapter must remove objects in the dependent regions as well.

I've successfully tested cache notifications, but I'm wondering if I could be notified only for evictions done at the server level and not for what is programmatically removed from a cache client. If not, it will be very difficult to know how to properly react when an item is removed.

Thanks in advance.

回答1:

AppFabric records eviction information in Performance Counters and the AppFabric Operational log in the Event Log. The Health Monitoring page shows how to enable the Operational log.

You should be able to use one of these in order to receive notifications of evictions, you'll probably need a monitoring service to do the actual notification.