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.


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


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

public class BlogArticle: IContentType
    // ... content properties