Cache Tag Helper Getting Started

The following Razor markup caches the current date:

<cache>@DateTime.Now</cache>

The first request to the page that contains the Tag Helper displays the current date. Additional requests show the cached value until the cache expires (default 20 minutes) or until the cached date is evicted from the cache.

Comments

Leave a Comment

All fields are required. Your email address will not be published.