Steroids

Primary tabs

Steroids is a module with a collection of ctools plugins to integrate Drupal with Varnish and offer simple cache invalidation when editing content. While the same cache invalidation setup can by achieved by combining the contrib modules listed below, steroids aims to be an all-in-one package.

IMPORTANT: This module is mainly focused on caching setups that involve the caching of pages for logged in users. If you just want anonymous page caching invalidation, you are most likely better of with the standard purge, expire and varnish modules.

Plugins

Installation

Download and enable the steroids module

Go to the configuration page (admin/config/development/steroids)

Setup cache bypass cookies for certain roles if you want to. If you map these cookie values in your varnish.vcl, you can construct a simple cache bypass rule for certain users so they always see uncached pages.

Select the expire options you want

Select your varnish version and enter your varnish servers as ip:port, one per line

Select the max-age settings for the predefined pages and for each content-type

Optional: configure some ESI blocks

If you edit content now, you will see watchdog entries about urls being sent to the varnish servers to purge/ban. Server-side you can monitor purge/ban request with varnishlog.