The attached patch adds support for cache tags (http://drupal.org/project/cachetags), which adds the tags in a custom header that varnish can invalidate against. THis is based on dixon's work here, but uses PURGE instead of the admin socket: http://drupal.org/node/1341322.
Because an extra header needs to be passed in, I added a headers parameter in purge_urls, keyed off the urls in the previous argument.
This patch also removes the dependency on expires. From what I could tell, the only reason it was necessary was for expires_print_r, so I copied a version of that function in.
| Comment | File | Size | Author |
|---|---|---|---|
| purge-cachetags.patch | 4.41 KB | msonnabaum |
Comments
Comment #1
msonnabaum commentedAlso, to get this to work you'd need something like the following in your vcl:
Comment #2
SqyD commentedComment #3
SqyD commentedIs anyone still interested in getting this into the 2.x branch?
The rewrite I'm doing will make adding this functionality a lot easier. May not make it into make it an initial 2.0 release but still seems interesting to implement.
Expire dependency will be dropped as well for 2.x
Comment #4
SqyD commentedplease respond if there is interest in this and I will (scouts honor) look into this for 2.x
Comment #5
SqyD commentedOkay, I bumped into Moshe W. this week and he mentioned Cache tags... That for sure counts as interest from the community so I will try to get this into the 2.x branch at some point in the near future.
Comment #6
SqyD commentedComment #7
vacilando commentedYes, support for cache tags would indeed be great!
Comment #8
japerry