Memcached - disabled one class from cache


I would like disable one class from memcached.

I have Comments class for article. Class Comments have relations for Article.


I use memcached on the server and comments will not load.

it is possible to disable for the selected class in memcached?

'cache' => [


			'class' => 'yii\caching\MemCache',

			'defaultDuration' => 3000,

			'servers' => [


					'host' => '',

					'port' => 11211,





What kind of cache do you use for comments? I mean, what data do you cache in memcache?

Guide > Caching


[*]Data caching

[*]Fragment caching

[*]Page caching

[*]HTTP caching


No it isn’t.

What we can do are the following:

  • Decide what data to cache

  • Decide when to invalidate the cached data