Skip to content

Commit

Permalink
Merge pull request #6634 from NaturalHistoryMuseum/ben/dwca-clear-cache
Browse files Browse the repository at this point in the history
Clear varnish cache on rebuild dwca
  • Loading branch information
benscott authored Apr 5, 2023
2 parents 1328d14 + ef295d6 commit e89c2dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sites/all/modules/custom/dwcarchiver/dwcarchiver.rebuild.inc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ function dwcarchiver_rebuild($dwcarchiver, $deliver = TRUE) {
if ($deliver && !user_access('scratchpads team')) {
drupal_set_message(t('The DwC-A has been rebuilt'));
}
// Clear varnish cache
$dwc_uri = dwcarchiver_get_archive_uri($dwcarchiver);
varnish_expire_cache(array($dwc_uri));
}

if ($deliver) {
Expand Down

0 comments on commit e89c2dc

Please sign in to comment.