using System; using System.Collections.Generic; namespace CP.Cache { /// /// 缓存接口 /// public interface ICache { /// /// 返回指定key是否有值 /// /// /// bool IsExist(string key); /// /// 添加指定key的对像 /// /// /// /// 超时分钟数 void AddObject(string key, T o, int t = 0); /// /// 获取指定key的对像 /// /// T GetObject(string key); /// /// 移出指定key的对像 /// /// void RemoveObject(string key); /// /// 批量移出类型key的对像 /// /// void RemoveObjectByRegex(string key); /// /// 移出所有Cache /// void RemoveAll(); /// /// 取出所有键 /// /// List GetKeys(); } }