Help4 Net
WordPress plugin tutorial

Clear the right cache, not every cache

Help4 CDN 0.2.1 can clear one page, selected paths, the homepage, or the full assigned domain across its POPs. Automatic invalidation handles normal publishing while compatible WordPress cache layers stay coordinated.

Help4 CDN 0.2.1 Cache Tools and Security Center in WordPress administration
Cache Tools provides homepage, full-domain, and selected-path actions. The status line records the latest accepted request.

Choose the smallest useful clear

What changedUseWhy
One public page or postClear Current Page in the admin bar, or enter its pathRemoves only the affected public object and related normalized variants.
Homepage blocks or featured contentClear HomepageTargets / without evicting unrelated assets.
Several known URLs or filesClear Selected PathsKeeps the purge site-scoped and preserves unrelated cache.
Theme, navigation, global layout, or broad plugin changeClear All CDN CacheCoordinates the assigned POPs and compatible origin cache layers.
Routine publish, delete, comment, term, or menu updateAutomatic cache managementThe plugin computes affected public URLs after WordPress finishes the change.

Clear paths from Cache Tools

  1. Open Help4 CDN.
    Sign in as a WordPress administrator and select Help4 CDN in the admin sidebar.
  2. Confirm the site is registered.
    The cache buttons remain disabled until the page shows a Help4 site ID.
  3. Enter local paths only.
    Use one path per line, such as /news/update/ or /wp-content/uploads/photo.webp. Same-site absolute URLs are accepted and normalized.
  4. Submit the narrow clear.
    Select Clear Selected Paths. The status line records the request time, scope, and result.
  5. Verify the public response.
    Reload in a private window and confirm the changed text, image, CSS, or script is current.
Do not paste another domain into the path box. Foreign-host and malformed inputs fail closed. They do not become a full-domain purge.

Use the admin-bar shortcuts

When an administrator views the public site, the WordPress admin bar exposes quick Help4 cache actions. Use Clear Current Page after editing the page you are viewing. Use the full clear only for changes that affect many routes.

Permissions: cache actions require the WordPress manage_options capability and a valid WordPress nonce. Visitors and unauthenticated callers cannot trigger these administrator actions.

Automatic invalidation

Keep Automatically clear affected edge cache after WordPress content changes enabled for normal publishing. The plugin responds to:

Content

Posts, pages, custom post status changes, attachments, comments, feeds, archives, and related public URLs.

Structure

Categories, tags, taxonomies, navigation menus, theme switches, and Customizer saves.

Software

Plugin activation, deactivation, deletion, upgrades, theme changes, and Autoptimize cache changes.

Safety

Purges remain within the registered Help4 site and never turn private WordPress responses into public cache objects.

Coordinate origin caches

A full clear also calls supported local cache APIs when they are active. Current integrations include:

  • WordPress persistent object cache
  • W3 Total Cache
  • WP Rocket
  • WP Super Cache
  • Autoptimize
  • LiteSpeed Cache
  • SiteGround Optimizer

The Detected software and cache stack section shows what the plugin found and recommends either Help4-managed browser headers or origin-header passthrough.

Set browser cache policy safely

Custom CDN header

Set a bounded max-age for assets served from the Help4 delivery hostname. Use immutable only for filenames that change when their contents change.

Respect origin

Use the origin's Cache-Control when an existing cache plugin or application already emits deliberate browser policy.

Do not mark mutable HTML or unversioned files immutable. Keep login, account, cart, checkout, administration, authenticated, cookie-bearing, and personalized responses BYPASS/no-store.

Automate a deployment clear

Use the authenticated JSON endpoint when a deployment tool needs to clear known paths. Store credentials in the deployment secret store, never in source code or a public command history.

curl -sS -X POST "https://example.com/wp-json/help4-cdn/v1/cache/refresh" \
  -H "Content-Type: application/json" \
  -H "X-Help4-Api-Key: YOUR_HELP4_KEY" \
  -H "X-Help4-Api-Secret: YOUR_HELP4_SECRET" \
  -d '{"scope":"paths","paths":["/","/assets/app.css"],"reason":"deploy"}'

See the JSON cache refresh tutorial for request shapes and error handling.

Verify more than HTTP 200

  1. Check the visible change.
    Confirm the expected heading, image, version string, or page structure is present.
  2. Inspect response headers.
    Confirm the expected X-Help4-Pop, cache state, policy, proxy mode, and content type.
  3. Compare the body when consistency matters.
    Use a checksum or a known content marker across the affected POPs; a generic error page can also return HTTP 200.
  4. Test private routes separately.
    Login, cart, checkout, account, and administration routes should stay uncached.
curl -sSI https://example.com/changed-page/
curl -sS https://example.com/changed-page/ | openssl dgst -sha256

When a page still looks stale

SymptomCheckResolution
One URL is oldPath, query string, canonical hostClear that exact public path and its canonical equivalent.
HTML is new but CSS is oldVersioned stylesheet URL and origin cacheClear the stylesheet path or publish a new versioned filename.
POP and origin disagreeCompatible cache plugin and object cacheUse the full clear once, then verify both body and headers.
Button is disabledHelp4 site ID and entitlementSave valid credentials and finish domain assignment or DNS validation.
Purge reports an errorRegistered domain, credentials, and path scopeCorrect the site identity and retry the narrow request before escalating.
Next: configure scanning, WAF, bot controls, headers, and access policy in the WordPress security tutorial.