The Fastly team has developed a module compatible with Drupal, which can be accessed at the following link: https://www.drupal.org/project/fastly.
For information regarding the managed Fastly CDN, please note that access to the Fastly dashboard is not available.
The Fastly module will automatically establish a connection to the service provided that the environment variables are defined correctly. The module requires the following two environment variables, which are provisioned by Platform.sh for our managed Fastly CDN offering.
FASTLY_API_SERVICE
FASTLY_API_TOKEN
Upon enabling the Module, it is essential to navigate to the Modules configuration settings and select the `Upload Latest Fastly VCL` button located on the "/admin/config/services/fastly" page. These snippets are essential for the functionality of the Drupal application in conjunction with the Fastly CDN service.
https://git.drupalcode.org/project/fastly/-/tree/8.x-3.x/vcl_snippets
Additionally, it is imperative to ensure that the Purger is configured correctly to facilitate the flushing of items from the Fastly CDN cache upon the saving or deletion of content.
web@drupal.0:~$ drush p-purger-ls
------------ -------- -------- --------------------
Instance Plugin Label Description
------------ -------- -------- --------------------
552e9b27ce fastly Fastly Purger for Fastly.
------------ -------- -------- --------------------
If you are experiencing a significant number of purges, it may be advisable to examine your other modules, such as the `Automated Cron` module, which could be contributing to this activity.
Type: service.purge Description:Purge was performed using API Token (<TOKEN>) for Service <SERVICE> - 35789 time(s) in the preceding 24h period.