Expand description
缓存插件 —— 管理缓存实例的生命周期
与 alun-cache 的关系:
alun-cache:提供 Cache trait + LocalCache/RedisCache 实现(纯存储层)CachePlugin:管理缓存实例的 start/stop(生命周期管理层)
使用模式:
ⓘ
let plugin = CachePlugin::new(&config);
plugin.start().await?;
let cache = plugin.cache().unwrap();
cache.set("key", &"value").await?;
plugin.stop().await?;Structs§
- Cache
Plugin - 缓存插件 —— 管理缓存实例的生命周期