Motivation
Currently, the ObjectCache holds all object data in the memory and also persist them in the local disk. When there're losts of session and tasks, the memoy will be not enough for all the data; so we need to switch the "oldest" object data out from the memory. In the REF, we're going to provide an framework/interfaces for the policy to decide "oldest" object data, and implement the LRU (Least Recently Used) as the default policy.
Function Specification
Support LRU policy for the object cache.
Solutions
When the object data was read or wrote, update it's access time. if the memory is not enough, remove the data from memory; if the client want to access the data again, load it from disk.
Additional context
N/A
Motivation
Currently, the ObjectCache holds all object data in the memory and also persist them in the local disk. When there're losts of session and tasks, the memoy will be not enough for all the data; so we need to switch the "oldest" object data out from the memory. In the REF, we're going to provide an framework/interfaces for the policy to decide "oldest" object data, and implement the LRU (Least Recently Used) as the default policy.
Function Specification
Support LRU policy for the object cache.
Solutions
When the object data was read or wrote, update it's access time. if the memory is not enough, remove the data from memory; if the client want to access the data again, load it from disk.
Additional context
N/A