Interfaces

Project

Pages Restful

NuGet packageOwin.Framework.Pages.Restful
GitHub sourceOwinFramework.Pages.Restful

Home |  Readme

[CacheOutput] attribute | The OWIN Framework Restful

The [CacheOutput] Attribute

Optionally attach this attribute to a web service 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

[IsService("order", "/order/", new[] { Method.Get })]
[CacheOutput("Order", CachePriority.Low)]
public class OrderService
{
}

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 service 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 service 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.