Now if i want to remove any node, is there any way the eviction policy can remove the node from the in-memory cache as well as the persistant storage ?
Removing and evicting are different things.
Eviction only happens to the in-memory state.
Removing happens to both the in-memory state as well as the persistent storage.
So, if you were to remove a node, even if the node is NOT in memory, it will still be removed from persistent storage.
oh alright, so the eviction policies will evict from the in-memory cache and not the persistent storage...
the only way by which a node can be removed from both the in-memory cache and the persistent storage is by explicitly calling "remove" ?
i was looking for a way by which nodes from both the in-memory and persistent storage can be pruned automatically based on the time they have lived..
You'd have to write your own timer-based code to do these removes then.
Basically, persistent storage is, well, persistent. :-)
I wrote my own code which will remove the node from the cache instead of evicting it. THis removes it from in-memory and the persistent storage as well. :)