Example #1
0
 private byte[] HandleFlushAll(string[] commandParams)
 {
     if (commandParams.Length > 0)
     {
         var delay = TimeSpan.FromSeconds(uint.Parse(commandParams[0]));
         _scheduler.Schedule(delay, () => _cache.Clear());
     }
     else
     {
         _cache.Clear();
     }
     return(Encoding.ASCII.GetBytes("OK\r\n"));
 }
Example #2
0
 /// <summary>
 /// Clears the cache.
 /// </summary>
 public void Clear()
 {
     _memCache.Clear();
 }