We are running into an issue with the combination of Drupal and Varnish Cache. Caching itself is working perfectly, however, when a page is edited, the entire site's cache gets cleared, rather than just the content that was edited/published. We went so far as to look at the purge code in the module and apparently, the path variable set by using base_path() is only returning a slash (/). Which would explain why all of our cache is getting wiped out on the smallest edits.

I am wondering if this issue has been seen before and if anyone has a resolution?

Comments

netpez’s picture

Title: Varnish Clears all cache rather than just page edited » Varnish Clears all cache rather than just the edited content
fabsor’s picture

Category: bug » support
Status: Active » Needs review

The "Drupal Default" cache setting handles cache purges in exactly the same way as the Drupal standard caching mechanism does - which means it purges the cache for all entries in the page cache when content is created/edited/deleted. You can avoid this behaviour altogether by selecting "None" instead, but this will require some extra work from your side, since you will have to use something like the Expire module or Cache actions or write your own solution if you select this option.

I'm changing this into a support request since this is the intended default behaviour of this module.

mgifford’s picture

Adding a related issue.

This does sound like it should be in the README too.

misc’s picture

Status: Needs review » Closed (outdated)

Closing issues that had no activity the latest year, please re-open if the issues is still relevant.