Skip to content

Enable LRU policy in ObjectCache #366

@k82cn

Description

@k82cn

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

Metadata

Metadata

Assignees

Labels

kind/featureNew feature or requestpriority/p1High priorityrferequest for enhancement
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions