Interfaces

Project

Pages Html

NuGet packageOwin.Framework.Pages.Html
GitHub sourceOwinFramework.Pages.Html

Home |  Readme

[CacheOutput] attribute | The OWIN Framework Pages

The [CacheOutput] Attribute

Optionally attach this attribute to a page to instruct the output cache middleware how to cache the response. This is only effective if you have installed and configured some output caching middleware.

Example Usage

[IsPage("home", "/")]
[CacheOutput("Page", CachePriority.Medium)]
public class HomePage
{
}

The [CacheOutput()] attribute has the following properties you can set.

CacheCategory

The value of this property is passed directly to the Output Cache middleware when this page handles the request. The Output Cache middleware can use whatever logic it wants to decide how long to cache data based on this category name.

CachePriority

The value of this property is passed directly to the Output Cache middleware when this page handles the request. The Output Cache middleware can use whatever logic it wants to decide how long to cache data based on this priority level.