The HTML cache - also referred to as the web cache - caches the actual HTML generated from your sublayouts and renderings. There is a cache per site in your solution. You can configure your HTML cache per presentation control. You can either set this generally on the control or where it is assigned. You can specify the HTML cache to vary on different parameters. For instance you can set it up so it varies by querystrings; then there will be stored multiple versions of the HTML depending on which querystring have been specified.
The HTML cache is really important; especially if you have renderings or sublayouts, which are rather slow. An example can be a menu which iterates over a large amount of items. When a rendering like this is HTML cached, it renders in constant time no matter how many items are to be rendered in the menu.
Please note that your site should be able to perform in some way or another without HTML cache, as this is cleared whenever you publish, which will be describe later in this article.
You can configure the allowed size of the HTML cache and whether it should be enabled or not for each of your sites. This is done in the sites section of the web.config. See the following line:
< site name = "website" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content " startItem="/Home" database="web" domain="extranet" cacheHtml="true" htmlCacheSize="10MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" />
Here the cacheHtml is set to true and the htmlCacheSize is set to 10mb.