Crates.io | actix-storage-hashmap |
lib.rs | actix-storage-hashmap |
version | 0.3.0 |
source | src |
created_at | 2020-11-02 22:26:21.090484 |
updated_at | 2023-01-11 23:22:04.671876 |
description | An implementation of actix-storage based on hashmap |
homepage | |
repository | https://github.com/pooyamb/actix-storage/ |
max_upload_size | |
id | 308078 |
size | 48,250 |
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
is a simple store without expiration functionality.
HashMapActor
is a full expiry_store implementation available under actor
feature.
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();