1 of 1 people found this helpful
You must not use expiration until the entry really can expire. You should probably store the reference counter directly inside the entry (or maybe in the metadata?) and update this using listeners on the other entries. As you don't want to send whole value over network when updating just the reference number part, you can implement DeltaAware interface.