Can I change the location of the cached Twig templates? By default, the Twig template cache appears to go into /files/php/twig.

I was wondering if it's possible to change this location? I use a shared file mount which is shared between multiple developers and my concern is that the Twig cache will be in competition with another developer.

Alternatively we can disable caching but this is not always appropriate.
Yes you can, put this in settings.php or any file loaded by it like settings.local.php:

  $settings['php_storage']['twig']['directory'] = '/path/to/tmp/folder';
  $settings['php_storage']['twig']['secret'] = $settings['hash_salt'];


Note that the directoy must exist already.