remotecache

Crates.ioremotecache
lib.rsremotecache
version0.0.0
sourcesrc
created_at2023-08-05 19:05:39.9195
updated_at2023-08-05 19:05:39.9195
descriptionA general purpose cache with possibly multiple remote servers for storing and retrieving data.
homepage
repository
max_upload_size
id936727
size214,538
(rohanku)

documentation

README

Remote Cache

A general purpose cache with possibly multiple remote servers for storing and retrieving data.

The cache includes both type-mapped and namespaced APIs. Caching can be done in-memory or persistently via a cache server that manages a filesystem cache. The cache also supports caching across several cache servers.

Usage

use cache::{persistent::client::{Client, ClientKind}, error::Error, Cacheable};

let client = Client::with_default_config(ClientKind::Local, "http://127.0.0.1:28055");

fn generate_fn(tuple: &(u64, u64)) -> u64 {
    tuple.0 + tuple.1
}

let handle = client.generate("example.namespace", (5, 6), generate_fn);
assert_eq!(*handle.get(), 11);
Commit count: 0

cargo fmt