Override defaults in cache.php

Is there a way to override this in cache.php:

protected static $standard_remove = [
‘cache://twig/’,
‘cache://doctrine/’,
‘cache://compiled/’,
‘cache://validated-’,
‘cache://images’,
‘asset://’,
];

protected static $all_remove = [
    'cache://',
    'cache://images',
    'asset://'
];

protected static $assets_remove = [
    'asset://'
]; 

protected static $images_remove = [
    'cache://images'
];

protected static $cache_remove = [
    'cache://'
];

In a plugin? I want to remove all instances of ‘cache://images’,

It is an interesting thought, I would presume one of the event hooks could do it, though I am not familiar with the process. I would be interested in your results though, disabling the caching of images could be useful where this is done manually or outside of Grav.

I’m not trying to prevent the caching of images, but to prevent the clearing of cached images on every cache-clear. My image cache is +1GB so I don’t want to recreate all images on every cache-clear. Anyway, I extended the Cache class in a plugin, and set the variables in my own class using parent::$standard_remove = $caches;
and it works. The only thing I’m still wondering is whether cli cache-clear commands reacts in the same manner to the events, as would a normal page request.

Currently there is no way to override these. However, improvements an be added to the core version by providing a Pull Request if the are generic enough to be of use for everyone.