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
| Change | Use | Effect |
|---|---|---|
| One route or asset | Clear selected paths | Normalizes local paths and same-host URLs, then requests an all-POP site-scoped purge. |
| Several known routes | One path per line | Keeps unrelated objects warm and rejects foreign hosts. |
| Theme, menus, site-wide block/layout, or broad deployment | Clear domain | Requests full registered-domain eviction. |
| Routine supported entity change | Automatic management | Invalidates 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.
Operate the queue
- 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. - Check Drupal logs after a failed clear.
The queue worker records a sanitized failure in thehelp4_cdnlogging channel. - Run the queue directly during a controlled test.
With Drush, processhelp4_cdn_purgeand 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.
Verify real content across the edge
- Request without Drupal session cookies or authorization.
- Confirm a known body marker, asset version, or SHA-256 hash.
- Inspect POP, cache, policy, proxy, WAF, and content-type headers.
- 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