Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Dec 12, 2020
1 parent 7e7f234 commit af2daee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ PRs & ideas are more than welcome! 🙏🏼

``` php
use Meema\CloudFront\Facades\CloudFront;
use Meema\CloudFront\Jobs\InvalidateCache;

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

$message = CloudFront::getInvalidation(string $invalidationId, string $distributionId = null);
$messages = CloudFront::listInvalidations(string $distributionId = null)
$messages = CloudFront::listInvalidations(string $distributionId = null);

// it's recommended to invalidate your cache using a job
dispatch(new InvalidateCache($path.'*')); // you may want to add a '*'-wildcard at the end of your path if you whitelisted any query parameters
```

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/).
Expand Down

0 comments on commit af2daee

Please sign in to comment.