Crates.io | cachedb |
lib.rs | cachedb |
version | 0.8.2 |
source | src |
created_at | 2021-10-18 18:10:39.05097 |
updated_at | 2022-12-22 15:15:08.22846 |
description | In memory Key/Value store that stores RwLock |
homepage | |
repository | https://github.com/cehteh/cachedb.git |
max_upload_size | |
id | 466950 |
size | 80,849 |
In memory Key/Value store with LRU expire and concurrent access
Items are stored in N sharded/bucketized HashMaps to improve concurrency. Every Item is always behind a RwLock. Quering an item will return a guard associated to this lock. Items that are not locked are kept in a list to implement a least-recent-used expire policy. Locked items are removed from that lru list and put into the lru-list when they become unlocked. Locked Items will not block the hosting HashMap.