Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Various Caching mechanisms for memoria #12

Open
0xnullifier opened this issue Dec 16, 2024 · 0 comments
Open

Implement Various Caching mechanisms for memoria #12

0xnullifier opened this issue Dec 16, 2024 · 0 comments

Comments

@0xnullifier
Copy link
Collaborator

0xnullifier commented Dec 16, 2024

Caching is important part of memoria as it takes up a notch from a simple key value store to fairly production level implementation of a key value store.

For each caching system the following CachePolicy interface must be implemented

type CachePolicy interface {
	Eject(m *Memoria, requriedSpace uint64) error
	Insert(m *Memoria, key string, val []byte) error
}

Currently the defaultCachePolicy is implemented which randomly deletes key value pairs from the cache
The following issues are opened explaining in details the cache policies to implement
FIFO Very famous cache policy it stands for First In First Out check it's issue here #13
LRU Least recently used is a great policy and would love to see this one implemented #14
CUSTOM If you have another great idea would love to listen to it open up a issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant