From f72c1a1b1772488323475c3711b7de9272e282d5 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Thu, 21 Nov 2024 12:40:56 +0900 Subject: [PATCH] Add code example for Fastly CDN integration Updated the README.md to include a PHP code example demonstrating how to integrate and configure the Fastly CDN module for BEAR.Sunday. This should help developers understand the implementation process more clearly. --- README.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 77a341c..27517a5 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,21 @@ > > – Phil Karlton -Fastly CDN integration for BEAR.Sunday +Fastly CDN integration module for BEAR.Sunday -See https://bearsunday.github.io/manuals/1.0/ja/cache.html +## Example + +```php +use BEAR\FastlyModule\FastlyEnableSoftPurgeModule; +use BEAR\FastlyModule\FastlyPurgeModule; + +// Set API key and service ID +$this->install(new FastlyPurgeModule( + $fastlyApiKey, + $fastlyServiceId +)); + +// Enable soft purge +$this->install(new FastlyEnableSoftPurgeModule()); +``` +See more at https://bearsunday.github.io/manuals/1.0/ja/cache.html