Skip to content

Commit 32e1d96

Browse files
committed
fix(edge): add purge tip
1 parent 9bbb971 commit 32e1d96

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

network/edge-services/how-to/configure-cache.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ This allows you to specify the precise objects that you want to clear from the c
8888

8989
The specified objects are purged from your cache and you are returned to the Edge Services dashboard.
9090

91+
<Message type="tip">
92+
To avoid repeat purging, you can also set the `Cache-Control` HTTP header directly on your files/objects. This allows you to define how long items should remain in the cache before being freshly retrieved from the origin.
93+
94+
For Object Storage bucket origins, the following example call to the S3 API updates the `Cache-Control` header for **all**** objects in the bucket, setting a maximum age of 60 seconds before they must be freshly retrieved. Edge Services will respect this header when determining from where to fetch content.
95+
96+
```
97+
./s3cmd --recursive modify --add-header="Cache-Control:max-age=60" s3://yourbucket/
98+
```
99+
</Message>
100+
91101
## How to disable your cache
92102

93103
1. In the Scaleway console, navigate to the Edge Services dashboard for the Object Storage bucket or Load Balancer pipeline whose cache you want to disable:

0 commit comments

Comments
 (0)