Skip to content

🛢️ Optimal cache algorithm for LRU use case in filesystems specifically for ease of file data access

Notifications You must be signed in to change notification settings

jim-nnamdi/Yael-Cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yael Cache

This is a personalised algorithm which implements an LRU use case for Database Optimizations and Filesystems. Apparently Databases uses an LRU cache to store frequently accessed data, and on query it returns the already cached data increasing query speed thereby decreasing latency. Same intuition goes for filesystems where a system caches most accessed files thereby letting users gain access quickly to recently used files, this is used in Datacenter file engineering.

Note

summary of the Time and space complexities for each operation

Operation Time Complexity Explanation
get_fs(key) O(1) Hash map lookup + doubly linked list update
put_fs(key) O(1) Hash map lookup + doubly linked list update
add_fs(key, value) O(1) Hash map insertion/update + list adjustments
remove_fs(key) O(1) Hash map lookup + doubly linked list update
Space Complexity O(C) Space to store up to ( C ) items

About

🛢️ Optimal cache algorithm for LRU use case in filesystems specifically for ease of file data access

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published