9 instantiations of OutputCacheAttribute
Microsoft.AspNetCore.OutputCaching.Tests (8)
OutputCacheAttributeTests.cs (8)
143[OutputCache()] 146[OutputCache(Duration = 42)] 149[OutputCache(NoStore = true)] 152[OutputCache(PolicyName = "MyPolicy")] 155[OutputCache(VaryByHeaderNames = new[] { "HeaderA", "HeaderC" })] 158[OutputCache(VaryByQueryKeys = new[] { "QueryA", "QueryC" })] 161[OutputCache(VaryByRouteValueNames = new[] { "RouteA", "RouteC" })] 164[OutputCache(Tags = new[] { "Tag1", "Tag2" })]
OutputCachingSample (1)
Startup.cs (1)
30app.MapGet("/attribute", [OutputCache(PolicyName = "NoCache")] (context) => Gravatar.WriteGravatar(context));
14 references to OutputCacheAttribute
Microsoft.AspNetCore.Mvc.Core (1)
Filters\OutputCacheFilter.cs (1)
43Resources.FormatOutputCacheAttribute_Requires_OutputCachingMiddleware(nameof(OutputCacheAttribute)));
Microsoft.AspNetCore.OutputCaching (2)
OutputCacheMiddleware.cs (2)
236var attribute = metadata?.GetMetadata<OutputCacheAttribute>();
Microsoft.AspNetCore.OutputCaching.Tests (11)
OutputCacheAttributeTests.cs (11)
16var attribute = OutputCacheMethods.GetAttribute(nameof(OutputCacheMethods.Default)); 27var attribute = OutputCacheMethods.GetAttribute(nameof(OutputCacheMethods.Duration)); 39var attribute = OutputCacheMethods.GetAttribute(nameof(OutputCacheMethods.NoStore)); 53var attribute = OutputCacheMethods.GetAttribute(nameof(OutputCacheMethods.PolicyName)); 68var attribute = OutputCacheMethods.GetAttribute(nameof(OutputCacheMethods.PolicyName)); 81var attribute = OutputCacheMethods.GetAttribute(nameof(OutputCacheMethods.VaryByHeaderNames)); 96var attribute = OutputCacheMethods.GetAttribute(nameof(OutputCacheMethods.VaryByQueryKeys)); 115var attribute = OutputCacheMethods.GetAttribute(nameof(OutputCacheMethods.VaryByRouteValueNames)); 128var attribute = OutputCacheMethods.GetAttribute(nameof(OutputCacheMethods.Tags)); 138public static OutputCacheAttribute GetAttribute(string methodName) 140return typeof(OutputCacheMethods).GetMethod(methodName, System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public).GetAttribute<OutputCacheAttribute>();