Content of the «Caching» section:
Articles section «Caching»:
To use client-side caching, you may configure [[yii\filters\HttpCache]] as a filter for controller actions whose rendering result may be cached on the client-side. HttpCache only works for GET and HEAD requests.
Page caching refers to caching the content of a whole page on the server-side. Page caching is supported by [[yii\filters\PageCache]], an action filter. It can be used in a controller class.
Fragment caching refers to caching a fragment of a Web page in Yii 2 Framework. Use fragment caching in Yii 2. Like data caching, a unique $id is needed to identify a content cache.
Data caching in Yii 2 is about storing some PHP variables in cache and retrieving it later from cache. It is also the foundation for more advanced Yii caching features, such as query caching and Yii page caching.
Caching is a cheap and effective way to improve the performance of a Web application. Caching can occur at different levels and places in a Web application. Yii supports all caching mechanisms.