Vallic purge
Vallic Purge clears the Vallic Cloud CDN automatically when content changes on your Drupal site, so visitors get fast cached pages that are never out of date.
A CDN (content delivery network) keeps copies of your pages on servers close to your visitors, which makes your site load faster. The catch is that a copy can go stale: you edit a page, and visitors keep seeing the old version until the copy expires. This module fixes that. When you save content, Drupal already knows which pages show it. Vallic Purge passes that on to the Vallic Cloud CDN, which drops just those copies, so the next visitor gets the new version.
Features
- Clears only what changed. Every page is sent with the cache tags Drupal already gives it. Saving an article clears the pages showing that article, not the whole cache.
- Clears by URL, or everything, for the Purge features that ask for it.
- Nothing to configure. Vallic Cloud gives every environment that has the CDN two environment variables, and the module reads them. There are no API keys, zone IDs or endpoints to enter, and none end up in your exported configuration.
- No CDN credentials on your site. The platform keeps the CDN's API key. Your site asks the machine it runs on to clear its cache, using a token that can only clear that one environment.
- Keeps response headers small. A busy Drupal page can carry hundreds of cache tags. Written out in full, they can make a response too large to deliver. Each tag is sent as a short hash instead.
- Safe to enable everywhere. On your laptop, in CI, or on an environment without the CDN, the module sends nothing and adds nothing to your responses. You can deploy the same configuration to every environment.
- A status report check shows whether purging is active and, if it is not, why.
Use it on any Drupal site hosted on Vallic Cloud with the CDN turned on.
Post-Installation
- Download the module and Purge:
composer require drupal/vallic_purge - Enable it together with Purge's queuer and processors:
drush en vallic_purge purge_queuer_coretags purge_processor_lateruntime purge_processor_cron - Add the purger:
drush p:purger-add --if-not-exists vallic
Without Drush, enable Purge UI and add it under Configuration » Development » Performance » Purge. - Set Browser and proxy cache maximum age under Configuration » Development » Performance. The CDN only keeps pages Drupal says may be cached. Pages for logged-in users are sent as private and are never cached, whatever this is set to.
- Export your configuration (
drush config:export) and deploy it, so every environment gets the purger.
There is no settings page. Check Reports » Status report to confirm purging is active. To see it work, edit a piece of content it. The change appears straight away instead of when the cached copy expires.
Additional Requirements
- Drupal 10.3 or later, or Drupal 11.
- Purge 3.5 or later.
- A Vallic Cloud environment with the CDN enabled. Anywhere else, the module has nothing to do.
Recommended modules/libraries
These come with Purge:
- Core tags queuer queues a purge whenever Drupal invalidates a cache tag. Without it, nothing is ever queued.
- Late runtime processor sends purges at the end of the request that caused them, so changes show at once.
- Purge Cron Processor sends anything left in the queue on cron.
- Purge UI shows the purgers, queue and processors in the admin interface.
Similar projects
Generic HTTP Purger can send purges to any HTTP endpoint, including this one, but you set everything up yourself: the endpoint, the token, the request body, and a tags header in the format the CDN matches. Vallic Purge does all of that for
you, keeps the header small, and needs no token in your configuration.
Modules for other CDNs, such as Cloudflare, Fastly or Akamai, work with those services and usually need their API credentials on the site. Vallic Purge works only with the Vallic Cloud CDN, and needs none.
Supporting this Module
Vallic Purge is built and maintained by Vallic Cloud. Please report bugs and ideas in the issue queue.
Community Documentation
- Vallic Cloud handbook: CDN: buying the CDN, pointing your domains at it, and the purge APIl.
How tags are matched
Each cache tag is sent in the CDN-Tag header as an eight-character hash, and a tag purge clears every response carrying thhash, purging one also clears pages carrying the other. That costs a cache miss, never stale content.
Depends on
Dependencies of the latest stable release
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.