Skip to content

Commit af2daee

Browse files
committed
wip
1 parent 7e7f234 commit af2daee

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ PRs & ideas are more than welcome! 🙏🏼
1818

1919
``` php
2020
use Meema\CloudFront\Facades\CloudFront;
21+
use Meema\CloudFront\Jobs\InvalidateCache;
2122

2223
// run any of the following CloudFront methods:
2324
$client = CloudFront::getClient(); // exposes the AWS CloudFront client
@@ -29,7 +30,10 @@ $result = CloudFront::invalidate($paths, string $distributionId = null);
2930
$result = CloudFront::reset();
3031

3132
$message = CloudFront::getInvalidation(string $invalidationId, string $distributionId = null);
32-
$messages = CloudFront::listInvalidations(string $distributionId = null)
33+
$messages = CloudFront::listInvalidations(string $distributionId = null);
34+
35+
// it's recommended to invalidate your cache using a job
36+
dispatch(new InvalidateCache($path.'*')); // you may want to add a '*'-wildcard at the end of your path if you whitelisted any query parameters
3337
```
3438

3539
Please note, object invalidations typically take from 60 to 300 seconds to complete. You can check the status of an invalidation by viewing your distribution from the [CloudFront console](https://console.aws.amazon.com/cloudfront/).

0 commit comments

Comments
 (0)