actix-storage-hashmap

Crates.ioactix-storage-hashmap
lib.rsactix-storage-hashmap
version0.3.0
sourcesrc
created_at2020-11-02 22:26:21.090484
updated_at2023-01-11 23:22:04.671876
descriptionAn implementation of actix-storage based on hashmap
homepage
repositoryhttps://github.com/pooyamb/actix-storage/
max_upload_size
id308078
size48,250
Pouya Mobasher Behrouz (pooyamb)

documentation

https://docs.rs/actix-storage-hashmap

README

actix-storage-hashmap

This crate provides implementations for actix-storage based on std lib's hashmap.

Please refer to actix-storage crate documentations for full details about usage and use cases.

There are 2 different implementers available in this crate

HashMapStore

HashMapStore is a simple store without expiration functionality.

HashMapActor

HashMapActor is a full expiry_store implementation available under actor feature.

Implementation details

HashMapActor is an AsyncActor running in actix's arbiter which uses tokio's delayqueue internally for expiration notifications.

It is possible to specify the size for the underlying channel between tokio's delayqueue and the actor. The default capacity of hashmap is also configurable.

let store = HashMapActor::with_capacity(10_000).start();
// OR
let store = HashMapActor::with_channel_size(16, 16).start();
// OR
let store = HashMapActor::with_capacity_and_channel_size(10_000, 16, 16).start();
Commit count: 192

cargo fmt