Skip to content

Add multilingual cache purging and per-language admin controls - #365

Open
misterbuchi wants to merge 10 commits into
keycdn:masterfrom
misterbuchi:agents/wpml-language-cache-deletion-feature
Open

misterbuchi wants to merge 10 commits into
keycdn:masterfrom
misterbuchi:agents/wpml-language-cache-deletion-feature

Conversation

@misterbuchi

@misterbuchi misterbuchi commented Aug 18, 2026

Copy link
Copy Markdown

This PR adds per-language cache clearing support for multilingual WordPress setups, including WPML, Polylang, qTranslate-X, TranslatePress, Weglot, and custom language URL setups.

What’s included:

  • Adds support for clearing language-specific caches in the admin bar.
  • Adds a “Clear All Languages” action for site-wide language cache purges.
  • Adds per-language entries so admins can clear the current language cache directly.
  • Adds “Clear All Translations” for the current post/page, clearing the cache for all translations of that content.
  • Detects translated page/post IDs and clears the translated permalink instead of only the current request path.
  • Supports custom language URLs via the plugin settings.
  • Includes fallback handling for translation detection and site-specific URL clearing.

Why:
In multilingual setups, each language may use a different domain, path, or query parameter. Clearing only the main site cache is often insufficient. This change makes it possible to clear the cache for the relevant language or translation set without clearing unrelated language caches.

Notes:

This is designed to work with common multilingual plugins and custom language setups.
It avoids clearing unrelated pages when a translated version exists and prefers the translated permalink when available.

@misterbuchi misterbuchi changed the title Agents/wpml language cache deletion feature Add multilingual cache purging and per-language admin controls Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant