<staticContent> <remove fileExtension=".woff" /> <!-- In case IIS already has this mime type --> <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" /> <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" /> </staticContent>
filters.Add(new OutputCacheAttribute { NoStore = true, Duration = 10, VaryByParam = "*" });
public class Configuration : DbConfiguration { internal static readonly InMemoryCache Cache = new InMemoryCache(); public Configuration() { var transactionHandler = new CacheTransactionHandler(Cache); AddInterceptor(transactionHandler); Loaded += (sender, args) => args.ReplaceService<DbProviderServices>( (s, _) => new CachingProviderServices(s, transactionHandler)); } public static int GetCountOfCache() { return Cache.Count; } }