Expand description

Memcached support for the bb8 connection pool.

Example

use futures::future::join_all;
use bb8_memcached::{bb8, MemcacheConnectionManager};

#[tokio::main]
async fn main() {
    let manager = MemcacheConnectionManager::new("tcp://localhost:11211").unwrap();
    let pool = bb8::Pool::builder().build(manager).await.unwrap();

    let mut handles = vec![];

    for _i in 0..10 {
        let pool = pool.clone();

        handles.push(tokio::spawn(async move {
            let mut conn = pool.get().await.unwrap();

            let version = conn.version().await.unwrap();
        }));
    }

    join_all(handles).await;
}

Re-exports

pub use bb8;

Structs

A bb8::ManageConnection for memcache_async::ascii::Protocol.