Simple concurrent async get with expiration for Rust.

Build Status Latest Version

Docs

shared-expiry-get is a wrapper for accessing and caching a remote data source with some expiration criteria.

Features

shared-expiry-get does not:

Example Use Cases

A basic Example

```rust

[derive(Clone)]

struct MyProvider {}

[derive(Clone)]

struct Payload {}

impl Expiry for Payload { fn valid(&self) -> bool { true } }

impl Provider for MyProvider { fn update(&self) -> ExpiryFut { future::ok::(Payload {}).into_future().boxed() } }

async fn main() { let rs = RemoteStore::new(MyProvider {}); let payload = rs.get().await; assert!(payload.is_ok()); } ```