using System; namespace FAuth.Extensions { /// /// 数据缓冲提供器接口 /// public interface ICacheProvider { /// /// 设置缓存数据 /// /// 数据类型 /// 数据键 /// 数据对象 /// 缓存时间或者从CacheTimeSpan选择值 void SetCache(string key,T obj,TimeSpan span) where T : class; /// /// 从缓存中获取数据,如果未缓存返回null /// /// 数据类型 /// 缓存数据的键 /// 数据对象 T GetObj(string key) where T : class, new(); } }