anya-core 1.2.0

Enterprise-grade Bitcoin Infrastructure Platform
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! CacheManager API [TEMPLATE]
//! [AIR-3][AIS-3][BPC-3][RES-3]

pub struct CacheManager;

impl CacheManager {
    pub fn new<T>(_config: T) -> Self { Self }
    pub async fn set(&self, _key: String, _value: Vec<u8>) -> Result<(), String> { Ok(()) }
    pub async fn get(&self, _key: &str) -> Result<Vec<u8>, String> { Ok(vec![]) }
    pub async fn cleanup(&self) -> Result<(), String> { Ok(()) }
    pub async fn get_stats(&self) -> Result<CacheStats, String> { Ok(CacheStats { expired_entries: 0 }) }
}

pub struct CacheStats {
    pub expired_entries: usize,
}