I've found that the cache never clears if the "Flush page cache on cron?" is enabled.
I think the culprit is (variable_get('varnish_flush_cron', 0) && lock_may_be_available('cron'))) in varnish.cache.inc.
If a check is added to see if varnish_cache_clear is set then flush on cron and flush on Drupal cache can both be enabled: variable_get('varnish_flush_cron', 0) && lock_may_be_available('cron')) && !variable_get('varnish_cache_clear', 1)).
I see that the expire module bypasses drupal cache and purges elements directly, so that wouldn't be affected.
Attached is a patch.
Comments
Comment #1
acouch commentedPatch attached for real this time.
Comment #2
danepowell commentedHmm... I applied this patch, but after editing a node the old version was still getting served up. It could be because I'm still suffering from #1232448: Editing nodes - Purge-command to Varnish not working anymore, which might eclipse this issue...
Comment #3
danepowell commentedOkay, yep- once I solved that other issue, I see that this really is an issue and the patch in #1 solves it. Although, I could see how this might be more of a user interface issue- i.e., if set to clear cache on cron, the module will ONLY clear cache on cron...
Comment #4
acouch commentedI think it makes more sense to have the option to clear at cron AND when when the normal Drupal cache is cleared. An example would be if you have something that grabs data from an outside service or doesn't use entities to update. We'd like to be able to clear those at a certain time while still being able to have the cache clear upon node edits etc.
If the maintainer doesn't feel that way PLEASE at leaset update the description because I spent quite some time tracking this down and would like to save anyone else the trouble.
Comment #5
fabsor commentedThe cache clear should be done both on cron AND together with whatever setting you set (Drupal default, standard or none), so I agree that this is a bug.
Comment #6
fabsor commentedAlright, this seems completely fine. Commited:
http://drupal.org/commitlog/commit/11214/0b670bc689d2616d65342400e2d7696...