Memory Based Eviction pollicy
by Mircea Markus
Hi guys,
After discussing with Manik, seems like a memory based eviction policy might
be helpful in certain scenarios.
I'm thinking to implement it in two steps:
1) define a more general points based eviction policy. The basic idea is
that for each object in the cache the user can 'plugglablly' define a number
of points(the memory is just a particularization, i.e. the number of points
for an object is represented by its size). When the sum of points for all
objects present in the cache is reached, the policy will trigger the
eviction: it will start removing nodes based on a defined strategy (LRU,
MRU, MFU etc) until the number of points goes bellow the threshold. I think
this points approach will add a bit of flexibility in the way the eviction
might be used.
2) The second step is to supply an implementation in which the points
represent memory units
Any thoughts?
Cheers,
Mircea
17 years, 9 months