diff --git a/apps/docs/content/features/cdn.mdx b/apps/docs/content/features/cdn.mdx index 9f3c5ee2..5022ee73 100644 --- a/apps/docs/content/features/cdn.mdx +++ b/apps/docs/content/features/cdn.mdx @@ -186,7 +186,30 @@ You should consider purging cached content when: ### Purging Cached Content -Zerops provides a simple [API](#api-reference) to manage and purge cached content before its normal expiration. You can use wildcard patterns to target specific content sets: +Zerops provides multiple ways to manage and purge cached content before its normal expiration: + +- **Command Line**: Use the `zsc cdn purge` [command](/references/zsc#cdn) available in all Zerops containers: + ```sh + # Purge all content for a domain + zsc cdn purge example.com + + # Purge specific path + zsc cdn purge example.com /images/ + ``` + +- **API Endpoints**: For programmatic control, use the [API endpoints](#api-reference). Here are ready-to-use curl examples for quickly purging content in your scripts: + + ```sh + # Static mode: Purge all content for a domain + curl --location --request PUT "https://api.app-prg1.zerops.io/api/rest/public/project/$PROJECT_ID/purge-cdn/static/$DOMAIN/*" \ + --header "Authorization: Bearer $USER_OR_ACCESS_TOKEN" + ``` + + ```sh + # Storage mode: Purge all content for object storage + curl --location --request PUT "https://api.app-prg1.zerops.io/api/rest/public/service-stack/$OBJECT_STORAGE_SERVICE_ID/purge-cdn/*" \ + --header "Authorization: Bearer $USER_OR_ACCESS_TOKEN" + ``` #### Purge Pattern Examples diff --git a/apps/docs/content/references/zsc.mdx b/apps/docs/content/references/zsc.mdx index d911a47e..fd282da7 100644 --- a/apps/docs/content/references/zsc.mdx +++ b/apps/docs/content/references/zsc.mdx @@ -81,6 +81,31 @@ zsc backup-create db --- +### cdn + +Manages CDN (Content Delivery Network) operations for your Zerops services. + +```sh +zsc cdn [command] +``` + +#### Available sub-commands +- `purge`: Invalidates cached content from the CDN for a specific domain. The purge command allows you to ensure that the most up-to-date content is being served to visitors after making updates to your site. + +#### Available flags +- `-h, --help`: Help for the cdn command + +#### Examples +```sh +# Purge CDN cache for a specific domain +zsc cdn purge example.com + +# Purge CDN cache for a specific path on a domain +zsc cdn purge example.com /images/ +``` + +--- + ### shared-storage Manages shared storage volumes for persistent data storage. diff --git a/apps/docs/static/llms-full.txt b/apps/docs/static/llms-full.txt index c56ac20b..03a66dc5 100644 --- a/apps/docs/static/llms-full.txt +++ b/apps/docs/static/llms-full.txt @@ -12522,7 +12522,22 @@ You should consider purging cached content when: ### Purging Cached Content -Zerops provides a simple [API](#api-reference) to manage and purge cached content before its normal expiration. You can use wildcard patterns to target specific content sets: +Zerops provides multiple ways to manage and purge cached content before its normal expiration. + +#### Using the Command Line or API + +You can purge CDN cache using: + +- **Command Line**: Use the [`zsc cdn purge`](/references/zsc#cdn) command available in all Zerops containers: + ```sh + # Purge all content for a domain + zsc cdn purge example.com + + # Purge specific path + zsc cdn purge example.com /images/ + ``` + +- **API Endpoints**: For programmatic control, use the [API endpoints](#api-reference). #### Purge Pattern Examples @@ -45677,6 +45692,31 @@ zsc backup-create db --- +### cdn + +Manages CDN (Content Delivery Network) operations for your Zerops services. + +```sh +zsc cdn [command] +``` + +#### Available sub-commands +- `purge`: Invalidates cached content from the CDN for a specific domain. The purge command allows you to ensure that the most up-to-date content is being served to visitors after making updates to your site. + +#### Available flags +- `-h, --help`: Help for the cdn command + +#### Examples +```sh +# Purge CDN cache for a specific domain +zsc cdn purge example.com + +# Purge CDN cache for a specific path on a domain +zsc cdn purge example.com /images/ +``` + +--- + ### shared-storage Manages shared storage volumes for persistent data storage. diff --git a/apps/docs/static/llms-small.txt b/apps/docs/static/llms-small.txt index 25c89425..7bde2dd6 100644 --- a/apps/docs/static/llms-small.txt +++ b/apps/docs/static/llms-small.txt @@ -12247,7 +12247,22 @@ You should consider purging cached content when: ### Purging Cached Content -Zerops provides a simple [API](#api-reference) to manage and purge cached content before its normal expiration. You can use wildcard patterns to target specific content sets: +Zerops provides multiple ways to manage and purge cached content before its normal expiration. + +#### Using the Command Line or API + +You can purge CDN cache using: + +- **Command Line**: Use the [`zsc cdn purge`](/references/zsc#cdn) command available in all Zerops containers: + ```sh + # Purge all content for a domain + zsc cdn purge example.com + + # Purge specific path + zsc cdn purge example.com /images/ + ``` + +- **API Endpoints**: For programmatic control, use the [API endpoints](#api-reference). #### Purge Pattern Examples