> For the complete Lynkow documentation index in agent-friendly format, see [llms.txt](/llms.txt).

# Cloudflare Cache Purge

**Published**: 2026-11-30
**Category**: Integrations

> Clears your own Cloudflare cache when content changes in Lynkow, so visitors see the new version within seconds.

## Prerequisites

- A Cloudflare account with the zone (domain) that serves your site. The Free plan works.
- Admin access to your Lynkow site.

## Step 1: Create a Cloudflare API token

1. Open [dash.cloudflare.com/profile/api-tokens](https://dash.cloudflare.com/profile/api-tokens) and click **Create Token**.
2. On the **Create Custom Token** row, click **Get started**.
3. Fill in the token:
  - **Token name**: `Lynkow Cache Purge`
  - **Permissions**: one row, `Zone` / `Cache Purge` / `Purge`
  - **Zone Resources**: `Include` / `All zones from an account` / your account

4. Click **Continue to summary**, then **Create Token**.
5. Copy the token. Cloudflare shows it only once.

## Step 2: Install the plugin

1. In the Lynkow dashboard, open **Apps** in the sidebar.
2. Under **Available plugins**, find **Cloudflare Cache Purge** and click **Install**. A three-step drawer opens.

### Events

Every event is selected by default. They are grouped by resource (`content`, `site_block`, `category`, `tag`, `review`, `redirect`, `variable`, and translation events for forms and products). Untick the groups that never change a cached page on your site, then click **Next**.

### API Token

Paste the token from Step 1 and click **Next**. Lynkow checks it with Cloudflare and loads the zones it can reach. An invalid token keeps you on this step with an error.

### Zone and settings

The plugin's own settings are labelled in French in every dashboard language.

- **Zone**: select the zone that serves your site.
- **Stratégie de purge** (purge strategy):
  - **Par préfixe (recommandé)**: purges only the URLs the change affects.
  - **Purge complète**: purges the whole zone on every change.

- **Domaine personnalisé** (custom domain), optional: click **Add** when your Cloudflare zone serves the site on another domain than the one set in Lynkow, for example `https://www.example.com`.
- **Préfixe de chemin absent des URLs publiques** (path prefix missing from public URLs), optional: leave it empty unless your front end drops a prefix your content is stored under. For a page saved at `/docs/getting-started` and served at `/getting-started`, enter `docs`. The plugin then purges both forms.

Click **Install**. The plugin appears under **Installed** with a green dot.

## Step 3: Check that it works

Hover the plugin row under **Installed** to show its actions:

- **Test** (test tube icon) sends a real purge and shows the result in a toast. A failure usually means the token expired or was revoked.
- **View logs** (file icon) opens **Activity logs**: one row per event, with its status, message, duration and time.

Start with **Par préfixe**. Switch to **Purge complète** only if some pages stay stale after a change.

## Troubleshooting

### "Zone ID ou API Token invalide"

Cloudflare rejected the credentials. Check that the token is still active, has the `Zone` / `Cache Purge` / `Purge` permission, and covers the zone. When in doubt, create a new token and paste it with **Configure** (gear icon).

### A log row says success but the page is still stale

The plugin sends its purge about 5 seconds after a change, so that changes made close together share one request. Cloudflare then needs a few more seconds to apply it. If the page is still stale 30 seconds later, the purge did not cover its URL:

1. Set **Domaine personnalisé** if the zone serves the site on another domain than the one in Lynkow.
2. Set **Préfixe de chemin absent des URLs publiques** if public URLs drop a prefix your content is stored under.
3. If neither applies, switch to **Purge complète**.

### Bulk edits and rate limits

Changes made within a few seconds of each other are grouped into one purge request. Each event still gets its own log row, which says how many events were grouped, for example `1 préfixe(s) purgé(s) (40 événements groupés)`. When a burst touches too many different pages for a targeted purge, the plugin purges the whole zone instead and the row reads `Purge complète effectuée`.

Keep the plugin enabled during bulk operations. Changes made while it is disabled are never purged, and no log row records them.

When Cloudflare answers that the account is rate-limited, the plugin waits the delay Cloudflare asks for, up to a few seconds, and retries once. A row ending with `1 nouvel essai après limitation Cloudflare` succeeded on that retry. If the retry fails too, the row shows the error:

- Your next change sends a new purge and usually clears it.
- To purge now, click **Purge everything** (eraser icon) on the plugin row and confirm.
- Cloudflare counts its purge limit per account, across all zones. Sites that purge through the same Cloudflare account share that limit, so avoid running bulk operations on them at the same time.

## Security

The API token is encrypted at rest. After saving, the dashboard shows only its last four characters (`••••a3f2`), and API responses never return it.

## Uninstall

Hover the plugin row under **Installed**, click **Uninstall** (trash icon) and confirm. Uninstalling deletes the plugin settings and activity logs. The Cloudflare token stays valid: delete it in Cloudflare if you no longer need it.

## Next Steps

- [Webhooks & Cache Revalidation](/sdk/advanced/webhooks-revalidation) - refresh your Next.js cache on the same changes.