You can set the period of caching your content on CDN servers in Control Panel. After the cache expiration time is over CDN servers send a request to the origin again.
CDN servers might determine that the file on the origin has not been changed. Then they will return to the end users the same file for another Cache Expiry period. If the file on the origin has been changed CDN servers will cache the new file.
You can use the cache parameters from the origin or set up the new values in your account.
Cache Expiry in the Control Panel
Add Cache Expiry and Override Origin Cache Settings options and activate them.
You need to enable both functions at the same time. Then the content will be cached on the servers for the period specified in the Cache Expiry option. Choose the value from the list or enter your own.
If Override Origin Cache Settings option is enabled you will be able to specify the cache period in the end users' browsers (Expires header).
Inherit Cache Headers from the origin
If you remove or disable the Override Origin Cache Settings option, content will be cached due to Cache-Control headers from your origin. Cache Expiry won't be considered, even if this option is enabled in the Control Panel.
Note! If the content is not requested by end users it will be removed from the cache after 36 hours.
HTTP Requests Caching
By default, we cache only GET and HEAD HTTP requests.
To enable POST requests caching send the following API request:
curl -X PATCH \
https://api.gcdn.co/resources/[resource_ID] \
-H 'Authorization: Token ' \
-H 'Content-Type: application/json' \
-d '{
"options": {
"proxy_cache_methods_set": {
"enabled": true,
"value": true
}
}
}'