Shmap
A key-value store based on unix shared-memory files (shm) for persisting state across program restarts.
Features
-
Items are stored in the unix shared memory: it uses
shm_opento create file in the ramdisk (/dev/shm), then they are mapped in memory with mmap. -
Concurrent access to items it provided thanks to
named-lockmutexes. -
Value serialization can be made transparently with serde (
bincode), so don't forget to use serde_bytes to enable optimized handling of&[u8]andVec<u8>! -
You can protect your data with AES256-GCM encryption.
-
You can add a TTL so that your items won't be available anymore after this timeout.
Example
use ;
use Duration;