Skip to content

cdn purge #233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion apps/docs/content/features/cdn.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
25 changes: 25 additions & 0 deletions apps/docs/content/references/zsc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
42 changes: 41 additions & 1 deletion apps/docs/static/llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down
17 changes: 16 additions & 1 deletion apps/docs/static/llms-small.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down