The cache being used can be any cache application component.
The ID of the cache application component is specified via [[cache]], which defaults to 'cache'.
Beware, by definition cache storage are volatile, which means the data stored on them
may be swapped out and get lost. Therefore, you must make sure the cache used by this component
is NOT volatile. If you want to use database as storage medium, DbSession is a better choice.
The following example shows how you can configure the application to use CacheSession:
Add the following to your application config under components:
php
'session' => [
'class' => 'yii\web\CacheSession',
'cache' => 'mycache',
]