| Crates.io | hitbox-redis |
| lib.rs | hitbox-redis |
| version | 0.1.1 |
| created_at | 2021-05-29 18:44:25.876777+00 |
| updated_at | 2021-05-29 21:06:06.119616+00 |
| description | Hitbox redis backend actor. |
| homepage | |
| repository | https://github.com/hit-box/hitbox/ |
| max_upload_size | |
| id | 403591 |
| size | 13,805 |
Hitbox is an asynchronous caching framework supporting multiple backends and suitable for distributed and for single-machine applications.
hitbox-redis is Cache Backend implementation for Redis.
This crate uses redis-rs as base library for asynchronous interaction with redis nodes. It uses one MultiplexedConnection for better connection utilisation.
use actix::prelude::*;
use hitbox_actix::prelude::*;
#[actix_rt::main]
async fn main() -> Result<(), CacheError> {
let backend = RedisBackend::new()
.await?
.start();
let cache = Cache::builder()
.finish(backend)
.start();
Ok(())
}