Skip to content

Instantly share code, notes, and snippets.

View MetaRecursion's full-sized avatar

Matt Mitchell MetaRecursion

View GitHub Profile
@MetaRecursion
MetaRecursion / ICacheService.cs
Last active December 23, 2015 12:09 — forked from kevinblake/ICacheService.cs
Updated ASP.NET caching sample with thread-safety.
using System;
namespace AppNamespace.Caching
{
interface ICacheService
{
T Get<T>(string cacheKey, Func<T> getItemCallback) where T : class;
T Get<T>(string cacheKey, DateTime absoluteExpiration, TimeSpan slidingExpiration, Func<T> getItemCallback) where T : class;
}
}