Memcached - disabled one class from cache

Hi,

I would like disable one class from memcached.

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

$article->getComments();

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' => '127.0.0.1',

					'port' => 11211,

				],

			],

			

       ],

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

Guide > Caching

http://www.yiiframework.com/doc-2.0/guide-caching-overview.html

[list=1]

[*]Data caching

[*]Fragment caching

[*]Page caching

[*]HTTP caching

[/list]

No it isn’t.

What we can do are the following:

  • Decide what data to cache

  • Decide when to invalidate the cached data