Skip to content
Snippets Groups Projects

Resolve #3452289 "Add step by step documentation"

1 file
+ 45
30
Compare changes
  • Side-by-side
  • Inline
+ 45
30
# CloudFront Cache Path Invalidate
Cloudfront Cache Path Invalidate module, you can manage the cache clear of
Amazon Cloudfront through a setting form.
Manage cache clearing in Amazon CloudFront through Drupal settings.
For a full description of the module, visit the
[project page](https://www.drupal.org/project/cloudfront_cache_path_invalidate).
For a detailed description and updates, visit the [project page](https://www.drupal.org/project/cloudfront_cache_path_invalidate).
Submit bug reports and feature suggestions, or track changes in the
[issue queue](https://www.drupal.org/project/issues/cloudfront_cache_path_invalidate).
Submit bug reports, feature suggestions, or track changes in the [issue queue](https://www.drupal.org/project/issues/cloudfront_cache_path_invalidate).
## Table of contents
## Table of Contents
- Requirements
- Installation
- Configuration
- Maintainers
- [Requirements](#requirements)
- [Installation](#installation)
- [Configuration](#configuration)
- [Maintainers](#maintainers)
## Requirements
This module requires the following :
- Drupal 10.x
- CloudFront Setup
AWS Distribution ID
AWS Access Key
AWS Secret Key
AWS Region
- AWS Setup:
- AWS Distribution ID
- AWS Access Key
- AWS Secret Key
- AWS Region
## Installation
Install the CloudFront Cache Path Invalidate:
Download it from [CloudFront Cache Path Invalidate](https://www.drupal.org/project/cloudfront_cache_path_invalidate) and install it on your website.
- With Composer
`$ composer require 'drupal/cloudfront_cache_path_invalidate'`
Install the module:
- **Manual Download:** Download from [CloudFront Cache Path Invalidate](https://www.drupal.org/project/cloudfront_cache_path_invalidate) and install on your website.
- **Using Composer:**
```sh
$ composer require 'drupal/cloudfront_cache_path_invalidate'
```
## Configuration
This needs the following settings:
Please use below $settings with your AWS Credential in settings.php file
$settings['aws.distributionid'] = '';
$settings['aws.region'] = '';
$settings['s3fs.access_key'] = '';
$settings['s3fs.secret_key'] = '';
1. **AWS Credentials:**
Add AWS credentials to `settings.php` or `settings.local.php`:
```php
$settings['aws.distributionid'] = ''; // Example: 'ABCD1234EFGH7'
$settings['aws.region'] = ''; // Example: 'eu-west-2'
$settings['aws.access_key'] = ''; // Example: 'AKIAIOSFODNN7EXAMPLE'
$settings['aws.secret_key'] = ''; // Example: 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'
```
Generate these from AWS IAM. See [AWS IAM User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).
2. **Configure Behavior:**
- Go to `/admin/config/services/auto-cloudfront-cache-entities`.
- Select entity type and bundle to trigger invalidation (e.g., "Content type" -> "Article").
- Toggle "Detail page" to invalidate paths on updates.
- Add additional paths to invalidate in "Cloudfront URL to invalidate".
3. **Test Behavior:**
Edit and save a "Page" node to trigger cache invalidation for its paths.
4. **Check Logs:**
Verify cache clearing in recent log messages:
```
Cloudfront Auto Cache Flush on Update entity_type: node_type bundle_type: article bundle: node entity_id: 123 and paths /articles, /articles/my-latest-updated-article
```
## Maintainers
- Prashant Mishra - [PrashantMishra](https://www.drupal.org/u/prashant-mishra)
\ No newline at end of file
- Prashant Mishra - [PrashantMishra](https://www.drupal.org/u/prashant-mishra)
Loading