I have a cache, it contains many datapoint, the datapoint looks like:
dpId integer
devId String
name String
The datapoint relates to device, their relationship is one-to-many, and they 
are connected according to devId, so the devId is the affinityKey.

The cache key is:
//key=devId + "_" + dpId
private String key;
@AffinityKeyMapped
private String devId;
​
public DpKey() {
}
For product purpose, we should keep the integrity of a set of datapoint, but 
when eviction policies triggered, a part of records that belong to a device my 
be evicted.

So my question is :

Is there a mechanism that allows the user to evict cache entries that relate to 
an affinityKey?

If no, is there a convenient way to implement it, how to do?

Anyone who can give me any advice will be appreciated.

Reply via email to