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")); }
/// <summary> /// Clears the cache. /// </summary> public void Clear() { _memCache.Clear(); }