1 unstable release

0.1.1 May 29, 2021
0.1.0 May 29, 2021

#3 in #cache-backend


Used in hitbox-actix

MIT license

16KB
207 lines

hitbox-redis

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.

Example backend usage with hitbox_actix

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(())
}

lib.rs:

hitbox Backend implementation for Redis.

This crate uses redis-rs as base library for asynchronous interaction with redis nodes. It use one MultiplexedConnection for better connection utilisation.

Dependencies

~11MB
~212K SLoC