CDN (Content Delivery Network，CDN) cache purging is a Tencent Cloud COS (Cloud Object Storage) feature based on SCF (Serverless Cloud Function) to help users automatically purge their data cached on CDN edge servers. If you add a trigger rule to your bucket, then when you update files in the bucket, the SCF function provisioned by COS will be automatically triggered to purge your cached data.
- If you added a cache purging rule to your bucket in the COS console, the resulting purging function will also appear in the SCF console. DO NOT delete this function; otherwise, your rule may not take effect.
- All regions where SCF is available support CDN cache purging, including Guangzhou, Shanghai, Beijing, Chengdu, Hong Kong, Singapore, Mumbai, Toronto, and Silicon Valley. For more supported regions, see the SCF Documentation.
- CDN cache purging may fail due to factors such as unstable network connection. In these cases, you can click View Log for the function you created in the COS console to open the SCF console where you can view the error log details for troubleshooting.
- This feature depends on SCF which provides users with a free tier. You will be billed for the part exceeding the free tier according to SCF Product Pricing. The more often you use this feature, the more invocations you will consume in the free tier.
If you haven’t activated the SCF service, go to the SCF console to activate it and enable SCF service authorization as instructed.
PUT ObjectAPI can trigger the function to purge your cache on CDN edge servers.
PurgeUrlsCache. In this way, SCF can replace your CDN cache with the latest data CDN pulls from the origin server on COS.