Callback when LRU Key is Deleted?

Is it possible to set up a callback for when a key-value pair is deleted, due to it being least recently used, from my memcache bucket?

Simplified use case:
Bucket contains key “keys” which is a set of all the keys I have inserted. If a key “A” is deleted due to LRU, I want to remove it automatically from “keys”.

Hi @zlatan

Unfortunately is this not a currently supported scenario. We are looking into having more advanced trigger type actions that can perform set actions but this isn’t available yet.

An alternative solution would be to have a custom app that monitored all keys in the bucket (eg using N1QL), and when it noticed one had disappeared, it would perform some action. Though the performance of this would vary greatly depending on the number of documents in a given bucket and if / how many query nodes were available.