Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 2.07 KB

README.md

File metadata and controls

29 lines (23 loc) · 2.07 KB

What does this package do?

Output caching has been introduced in ASP.NET Core 7.0, which means you need to be on at least version 11 of Umbraco. This package caches all your server side code like the output of your razor templates so that it is not executed over and over again as you get more concurrent visitors but will be cached for the duration you set, by default this package sets it to 10 seconds. This should help improve the performance of your Umbraco server bringing down CPU utilization etc.

CacheLifeSpanInSeconds

The default CacheLifeSpanInSeconds is 10 seconds, this can be modified using the Advanced setup procedure. Its important to note that content changes in the backoffice will reset the cache, so that published changes are available instantly.

Simple setup procedure

Just install the package, and your default RenderController will have OutputCache enabled with a 10 seconds cache interval, which means you get OutputCaching enabled by just installing the package.

Advanced setup procedure

The appsettings.json file can be used to change the OutputCache LifeSpanInSeconds from the default 10 seconds to E.g. 5 seconds as shown below

{
	"OutputCacheSettings":
	{
		"CacheLifeSpanInSeconds": 5
	}
}

Hardcore setup procedure

Since this package is open source, feel free to reference the source code and build your own OutputCache mechanisms without having to install this package.

For more details on how to configure your own default RenderController check the official Umbraco documentaion

Want to sponsor?

This is a free package, but if you want to sponsor my open source work, here is my GitHub profile