pub struct Cache { /* private fields */ }
Implementations§
source§impl Cache
impl Cache
sourcepub fn connect(config: JsonValue) -> Self
pub fn connect(config: JsonValue) -> Self
链接配置
- config 配置
{
"default": "redis",
"connections": {
"redis": {
"mode": "redis",
"hostname": "127.0.0.1",
"hostport": 6379
}
}
}
sourcepub fn set_message_queue(&mut self, key: &str, value: JsonValue) -> bool
pub fn set_message_queue(&mut self, key: &str, value: JsonValue) -> bool
设置消息队列
sourcepub fn get_message_queue(&mut self, key: &str) -> JsonValue
pub fn get_message_queue(&mut self, key: &str) -> JsonValue
获取消息队列