Closed (fixed)
Project:
Varnish
Version:
7.x-1.0-beta1
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 May 2012 at 04:49 UTC
Updated:
30 Jun 2012 at 10:41 UTC
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
Comment #1
cmlaraSeeing 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.
Comment #2
manarth commentedThe 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
Comment #3
fabsor commentedAs 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.