Help4 Net
Drupal module tutorial

Keep Drupal cache tags and edge objects aligned

The module invalidates Drupal cache tags immediately, then queues a Help4 all-POP purge so content editing is not blocked by control-plane network time.

Manual cache actions

ChangeUseEffect
One route or assetClear selected pathsNormalizes local paths and same-host URLs, then requests an all-POP site-scoped purge.
Several known routesOne path per lineKeeps unrelated objects warm and rejects foreign hosts.
Theme, menus, site-wide block/layout, or broad deploymentClear domainRequests full registered-domain eviction.
Routine supported entity changeAutomatic managementInvalidates Drupal cache tags and queues the configured path/domain Help4 scope.

Automatic entity invalidation

The module handles supported node, taxonomy term, media, file, and custom menu-link entity changes. It invalidates the entity's cache tags and list tags, then creates one queue item for Help4.

Path scope

Queues the canonical entity route plus the homepage when a safe canonical route exists. If it cannot produce one, it falls back to a domain clear.

Domain scope

Queues a domain clear after each supported public entity change. It is broader and appropriate when the site's layout aggregates content widely.

The queue separates content saves from the edge API. A temporary control-plane error is logged and retried through normal Drupal queue handling instead of breaking the editor's save request.

Operate the queue

  1. Run cron on schedule.
    Use a real server scheduler or trusted cron service; page-triggered cron alone may leave invalidation waiting on low-traffic sites.
  2. Check Drupal logs after a failed clear.
    The queue worker records a sanitized failure in the help4_cdn logging channel.
  3. Run the queue directly during a controlled test.
    With Drush, process help4_cdn_purge and then verify the public object.
drush cron
drush queue:run help4_cdn_purge
drush watchdog:show --type=help4_cdn

Browser cache policy

Respect origin

Preserve the origin's deliberate Cache-Control policy when Drupal and its reverse-proxy configuration already classify responses correctly.

Custom policy

Set a bounded public asset max age. Use immutable only for fingerprinted filenames whose URL changes when the content changes.

Do not public-cache personalized Drupal responses. User sessions, forms, login, administration, carts, account pages, cookie-bearing responses, non-200 responses, and other private content must remain BYPASS/no-store.

Verify real content across the edge

  1. Request without Drupal session cookies or authorization.
  2. Confirm a known body marker, asset version, or SHA-256 hash.
  3. Inspect POP, cache, policy, proxy, WAF, and content-type headers.
  4. Exercise login, administration, forms, and authenticated pages separately.
curl -sSI https://example.com/current-node
curl -sS https://example.com/current-node | openssl dgst -sha256
Next: configure managed WAF, bots, transport, headers, and Enterprise access in the Drupal security tutorial.