Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm trying to use drush commands to expire cache.
I've not error and warnings (I'm using Varnish as external cache), everything seems configured, on my watchodog entries I've right messages:
Expiration was executed for the next URLs:
URL: node/10021
Wildcard: false
Expired object: node
--------
URL: archivio/canti/sta-cità
Wildcard: false
Expired object: node
But if I try, with firebug, to reload that page, I saw that the age is greater than 0 and the system tells me that the page is server by Varnish.
What's wrong?
Thanks,
Sergio
PS: If I save the node, node page expires correctly, the problems seems drush
Comments
Comment #1
arrubiu CreditAttribution: arrubiu commentedComment #2
arrubiu CreditAttribution: arrubiu commentedOk, I've found the reason.
Drush command works if I launch it with admin user, like:
drush --user=1 expire-path my-custom-path
If this is not only a problem for me, could be useful to add somewhere this information.
Comment #3
SpleshkaReally tried, but could not reproduce the issue. For me everything works without
--user=1
setting. Ensure that you configured $base_url in settings.php.Comment #4
mukhsim CreditAttribution: mukhsim commentedIn order for this to work, you need to pass "-l" option to drush, for example:
drush -l http://mysite.com xp-node 1