I want to use Varnish module for drupal 7 site that runes adsense module too (http://drupal.org/project/adsense). This module allows adsense revenue sharing feature and for example if the revenue sharing is 50%, the adsense block which is a php block, needs to run every time for every visitor and it should not be cached. Now i want to know how can i prevent this block from being cached if i want to all other parameters of pages to be cached by Varnish module except this block? How can i do this? Please guide me.

Comments

cmlara’s picture

Seeing no response.

You will probably need to go an Edge Side Include method for this.

Drupal 7 lacks this as the modules are not really there yet. I am on Drupal 6 with the ESI Blocks module myself. Varnish can only cache full pages.

With ESI you basically get a separate page for each block that can vary per page per user etc.

A few modules exist on Drupal 7 but they all require custom coding or are in a "beta" status.

manarth’s picture

The ESI module for D7 is actually in pretty good shape now; for delivering (and caching) the block separately it should be fine. http://drupal.org/project/esi

fabsor’s picture

Status: Active » Fixed

As manarth suggests, the ESI module is the way to go for this. The varnish module is just providing the low-level integration with the varnish control terminal.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.