zero4rs 2.0.0

zero4rs is a powerful, pragmatic, and extremely fast web framework for Rust
Documentation
use lazy_static::lazy_static;

use super::YourCache;

lazy_static! {
    pub static ref RS_CACHE_1H_BYTES: YourCache::<bytes::Bytes> =
        YourCache::build(3600, 5 * 1024 * 1024);
}

pub fn put1h_bytes(cache_key: &str, value: bytes::Bytes) {
    RS_CACHE_1H_BYTES.put(cache_key, value);
}

pub fn get1h_bytes(cache_key: &str) -> Option<bytes::Bytes> {
    RS_CACHE_1H_BYTES.get(cache_key)
}

pub fn exists1h_bytes(cache_key: &str) -> bool {
    RS_CACHE_1H_BYTES.exists(cache_key)
}