API Reference: ResponseCacheAttribute Class

The ResponseCacheAttribute can be applied to page content model classes. The attribute sets the HTTP cache expiration of pages of this content type.

If ResponseCacheAttribute is not specified, Redakt does not output any HTTP cache headers.

Usage

Decorate the content model class with the ResponseCacheAttribute. Pass the cache expiration (in seconds) in the attribute constructor.

Example

In the following example the HTTP response cache for the BlogArticle content type is set to 300 seconds (5 minutes).

[Page]
[ResponseCache(300)]
public class BlogArticle: IContentType
{
    // ... content properties
}