Acquia Copilot is a conversational AI connected into our product documentation and knowledge base. Ask Copilot about product features, technical details, troubleshooting and how to get started with Acquia products.
[GITREF]: The Git reference of the branch or tag deployed to an environment.
[DATABASE_ROLE]: A website-specific identifier, based on the database.
Viewing Twig caches in Cloud Next
You cannot view Twig caches in this path if you log in through SSH. Twig caches are built during the Drupal web request process to create the fully-rendered HTML. This happens on the Drupal pods that run the Apache or PHP layer. However, SSH pods run other functions such as Drush commands. As Twig file caches are not required for Drush or command-line activities, the system does not propagate them to SSH pods.
Separating Twig caches by commit and website allows Cloud Platform to purge unused Twig cache directories, preventing them from filling up ephemeral storage on busy infrastructure that frequently deploy code requiring many Twig cache files.
Cloud Platform limits maximum request time to 600 seconds. Outdated Twig cache directories are removed 700 seconds after a code deployment completes, ensuring no active processes still need access to older Twig cache directories.
Altering Twig cache directories
To alter the Twig cache storage directory, overwrite the value for $settings['php_storage']['twig']['directory'] in your application’s sites/default/settings.php file after the Acquia settings require line, as shown in the following example:
// On Cloud Platform, this include file configures Drupal to use the correct
// database in each site environment (Dev, Stage, or Prod).
if (file_exists('/var/www/site-php')) {
require('/var/www/site-php/mysite/mysite-settings.inc');
}
// Alter the Twig cache storage directory.
$settings['php_storage']['twig']['directory'] = '/mnt/tmp/mysite/php_storage/twig';
[GITREF]: The Git reference of the branch or tag deployed to an environment.
[DATABASE_ROLE]: A website-specific identifier, based on the database.
Viewing Twig caches in Cloud Next
You cannot view Twig caches in this path if you log in through SSH. Twig caches are built during the Drupal web request process to create the fully-rendered HTML. This happens on the Drupal pods that run the Apache or PHP layer. However, SSH pods run other functions such as Drush commands. As Twig file caches are not required for Drush or command-line activities, the system does not propagate them to SSH pods.
Separating Twig caches by commit and website allows Cloud Platform to purge unused Twig cache directories, preventing them from filling up ephemeral storage on busy infrastructure that frequently deploy code requiring many Twig cache files.
Cloud Platform limits maximum request time to 600 seconds. Outdated Twig cache directories are removed 700 seconds after a code deployment completes, ensuring no active processes still need access to older Twig cache directories.
Altering Twig cache directories
To alter the Twig cache storage directory, overwrite the value for $settings['php_storage']['twig']['directory'] in your application’s sites/default/settings.php file after the Acquia settings require line, as shown in the following example:
// On Cloud Platform, this include file configures Drupal to use the correct
// database in each site environment (Dev, Stage, or Prod).
if (file_exists('/var/www/site-php')) {
require('/var/www/site-php/mysite/mysite-settings.inc');
}
// Alter the Twig cache storage directory.
$settings['php_storage']['twig']['directory'] = '/mnt/tmp/mysite/php_storage/twig';