? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? secondsTimeOut = timeout;
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? Redis.Expire(key, secondsTimeOut);
? ? ? ? ? ? }
? ? ? ? ? ? return true;
? ? ? ? ? ?
? ? ? ? }
? ? ? ? ///
? ? ? ? /// 获取
? ? ? ? ///
? ? ? ? ///
? ? ? ? ///
? ? ? ? ///
? ? ? ? public T Get
? ? ? ? {
? ? ? ? ? ? return Redis.Get
? ? ? ? }
? ? ? ? ///
? ? ? ? /// 删除
? ? ? ? ///
? ? ? ? ///
? ? ? ? ///
? ? ? ? public bool Remove(string key)
? ? ? ? {
? ? ? ? ? ? return Redis.Remove(key);
? ? ? ? }
? ? ? ? #endregion
? ? ? ? //释放资源
? ? ? ? public void Dispose()
? ? ? ? {
? ? ? ? ? ? if (Redis != null)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? Redis.Dispose();
? ? ? ? ? ? ? ? Redis = null;
? ? ? ? ? ? }
? ? ? ? ? ? GC.Collect();
? ? ? ? }
? ? }