Exemplo n.º 1
0
 /// <summary>
 /// 释放,开始立即更新所有缓存
 /// </summary>
 public void Dispose()
 {
     if (DoFlush)
     {
         InnocellenceMessageQueue.OperateQueue();
     }
 }
 /// <summary>
 /// 启动线程轮询
 /// </summary>
 public void Run()
 {
     do
     {
         InnocellenceMessageQueue.OperateQueue();
         Thread.Sleep(_sleepMilliSeconds);
     } while (true);
 }
        public void RemoveFromCache(string key)
        {
            if (string.IsNullOrEmpty(key))
            {
                return;
            }

            InnocellenceMessageQueue.OperateQueue(); //延迟缓存立即生效
            _cache.KeyDelete(key);                   //删除键
        }