oxcache 0.3.2

A high-performance multi-level cache library for Rust with L1 (memory) and L2 (Redis) caching.
1
2
3
4
5
6
7
8
9
10
11
12
// This file should FAIL to compile because `#[cached(sync)]` cannot be
// combined with `async fn`. The macro panics at expansion time with:
//   "`#[cached(sync)]` cannot be used with `async fn` ..."

use oxcache::cached;

#[cached(service = "compile_fail_test", sync)]
async fn get_user() -> Result<(), ()> {
    Ok(())
}

fn main() {}