daynnnnn/statamic-cloudfront
Composer 安装命令:
composer require daynnnnn/statamic-cloudfront
包简介
Allows you to use cloudfront as a statamic cache strategy.
README 文档
README
Use cloudfront as a static cache driver.
Installation
From a standard Statamic V3 site, you can run:
composer require daynnnnn/statamic-cloudfront
Then you'll just need to add the cloudfront strategy to your static cache config:
'strategies' => [
...
'cloudfront' => [
'driver' => 'cloudfront',
'expiry' => null,
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'distribution' => env('CLOUDFRONT_DISTRIBUTION_ID'),
],
],
How it works
It's pretty simple; if the page should be cached, it sets the responses cache control header to cache for 30 days. Then if a page is updated, an invalidation request will be sent to cloudfront for that page.
Things to work on
- Add some tests.
- Try and remove
aws/aws-sdk-phpdependency.
统计信息
- 总下载量: 1.97k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2021-07-26