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)
}