We are trying to optimize our site's performance with Varnish together with the Cache Expiration module to selectively purge only the updated content from varnish.

However, one problem has come up, since we are listing content with Views, the expire module has no way of knowing which pages the updated content is listed on, and can't purge these at the same time the node url gets purged.

I guess we could purge all content from Varnish at regular intervals using cron, but that would also remove lots of perfectly valid content from the cache. Has anyone manage to solve this in a nice way?

1 Answer 1


If the views are blocks you can use something like http://drupal.org/project/block_refresh and set a short expiration for the ajax callback that module uses.

If you want to get more advanced, you could strip the JS stuff out of that module and use its ajax callback, then use edge-side includes to have varnish pull in the block content dynamically.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.