Beispiel #1
0
        private byte[] HandleTouch(string[] commandParams)
        {
            var  key     = _converters.ToKey(commandParams[0]);
            var  exptime = _converters.ToExpiry(commandParams[1]);
            bool success = _cache.Touch(key, exptime);

            return(success
                       ? Encoding.ASCII.GetBytes("OK\r\n")
                       : Encoding.ASCII.GetBytes("NOT_FOUND\r\n"));
        }