Exemplo n.º 1
0
        public async Task <TimeSpan?> Age(string channel, string key = null)
        {
            Logger.Write(LogLevel.Debug, () => $"Getting age of delayed channel [{channel}] key [{key}]");

            var specificAge = await _cache.Age(channel, key).ConfigureAwait(false);

            if (specificAge > TimeSpan.FromMinutes(5))
            {
                SlowLogger.Write(LogLevel.Info, () => $"Delayed channel [{channel}] specific [{key}] is {specificAge?.TotalMinutes} minutes old!");
            }

            return(specificAge);
        }
        public async Task <TimeSpan?> Age(string channel, string key = null)
        {
            var specificAge = await _cache.Age(channel, key).ConfigureAwait(false);

            return(specificAge);
        }