Hello!

You can do scanQuery on every partition periodically and remove old entries
along with their dependencies. This might be easier than this eviction
policy business. Just my 5c.

Regard,
-- 
Ilya Kasnacheev


пт, 1 мар. 2019 г. в 15:41, BinaryTree <[email protected]>:

> 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