Disabling cache for plugins, updates, et al

I’ve disabled page cache on my development machine using the following config setting:

return [
	'cache' => [
		'pages' => [
			'active' => false
		]
];

Just to keep things tidy in development, is it possible to disable the cache created for plugins and updates as well?

For example, these sorts of things …

image

There is no general setting for plugin caches. Different plugins probably handle this differently, I’ve done it via a cache option in the past. Not sure what happens if you set 'cache' => false, i.e. if that also includes plugin caches. Should be easy to find out by removing the caches and see if they are recreated with this setting.

That would be good to know. Will also have to test that. Great question, @splorp

I’ve confirmation that using 'cache' => false only applies to pages.

However, you can also use the following to disable the ‘updates’ cache.

return [
	'cache' => [
		'updates' => [
			'active' => false
		]
];

Unfortunately, doing this also disables the plugin version status.

image

every plugins cache can be changed (different driver etc) or disabled.


<?php
return [
   'bnomei.redirects.cache' => false,
];
1 Like

Brilliant!

Thank you, Bruno.