コード例 #1
0
        public async Task AddAsync(string cacheKey, TimeSpan slidingExpiryWindow, object dataToAdd)
        {
            if (dataToAdd == null || !IsCacheEnabled)
            {
                await Task.Delay(0);
            }

            await InnerCache.AddAsync(cacheKey, slidingExpiryWindow, dataToAdd);
        }
コード例 #2
0
        public async Task AddAsync(string cacheKey, DateTime absoluteExpiryDate, object dataToAdd)
        {
            if (dataToAdd == null || !IsCacheEnabled)
            {
                await Task.Delay(0);
            }

            await InnerCache.AddAsync(cacheKey, absoluteExpiryDate, dataToAdd);
        }