Try Now
More in this section
Blogs RSS feed

Improve the application start-up and the effects of page templates changes for websites with heavy load

by Ivan Eftimov

Output caching in Sitefinity is a very important and useful feature, especially for websites with heavy load. In a nutshell, Sitefinity caches the rendered output for a particular page (personalized pages also!) when the page is requested for the first time and stores it in memory for other requests which may need the same output. In this way, the loading speed of the pages is significantly improved. If you want to find out more details about the output cache in Sitefinity, take a look at this documentation article.

Now, when you have a website with a heavy load, on start-up, one page may be requested many times before the first request stores it into the cache. This is how output cache works in ASP.NET. Such scenario will cause a lot of requests to the database and as many compilations of one and the same page, which will lead in slow application start-up and heavy CPU load during it. To solve this issue, we introduced an optimization to the output cache which locks the page after the first request until it gets into the cache and then serves the cached version to the other request. This feature is available per Output cache Profile and it is switched off by default. The exact place where you may find it is: Advanced Settings -> System -> Output Cache Settings -> Output Cache Profiles -> Your Profile -> Wait for page OutputCache to fill (see the screenshot bellow).

Wait for Output Cache to Fill Configuration


The benefit will, of course, be lower CPU and database load, and consequently faster application start-up. Moreover, the benefit may be seen not only on application start-up, but also on when you publish a page template. Then, the output cache is invalidated, and the affected page/s should be loaded again form database and recompiled.

One may argue that this feature will make all the requests that requested a certain page, which is not cached, wait for the output cache, but leaving them all to call the database for content and compile that content has a limit. That limit is almost always overreached in websites with heavy load.

Leave a comment