To provide persistent caching across application restarts, a disk-based cache implementation is needed. Utilizing sled, a high-performance embedded database, this implementation will fulfill the CacheProvider contract, allowing large or persistent data to be stored efficiently on the local file system without consuming excessive RAM.
Implementation guidelines
- Implement the
CacheProvider trait for a new DiskCache struct.
- Initialize the
sled database instance with a configurable local directory path.
- Serialize keys and values using a fast binary format (e.g.,
bincode) before inserting them into the sled tree.
- Handle database locking and concurrency properly as expected in an asynchronous context.
Files location
crates/core/src/cache/disk.rs
Expected result
A reliable, persistent caching layer that survives application restarts, efficiently managing local storage using the sled embedded database.
Please make sure to use the PR template when submitting your pull request.
Join the contributor Telegram group and ask any questions: https://t.me/+sII7WPhll2liMGNk
To provide persistent caching across application restarts, a disk-based cache implementation is needed. Utilizing
sled, a high-performance embedded database, this implementation will fulfill theCacheProvidercontract, allowing large or persistent data to be stored efficiently on the local file system without consuming excessive RAM.Implementation guidelines
CacheProvidertrait for a newDiskCachestruct.sleddatabase instance with a configurable local directory path.bincode) before inserting them into thesledtree.Files location
crates/core/src/cache/disk.rsExpected result
A reliable, persistent caching layer that survives application restarts, efficiently managing local storage using the sled embedded database.
Please make sure to use the PR template when submitting your pull request.
Join the contributor Telegram group and ask any questions: https://t.me/+sII7WPhll2liMGNk