summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSpleshka2014-10-31 07:49:41 (GMT)
committerSpleshka2014-10-31 07:49:41 (GMT)
commit84cec7e35f0efed206c11f4b44f4763382e54ccd (patch)
tree86c0ea7a0bbe998025458a2b8044e7ce03c7b666
parentf5dc56b13b7a86937e78936318a0b2391cdb1a0e (diff)
Issue #2232283 by Spleshka, Island Usurper, mikhailian: Frontpage is not cleaned in Varnish by Drush because it is reported as <front> and not as / by expire.
-rw-r--r--expire.drush.inc16
1 files changed, 11 insertions, 5 deletions
diff --git a/expire.drush.inc b/expire.drush.inc
index 5b5a595..6724ab8 100644
--- a/expire.drush.inc
+++ b/expire.drush.inc
@@ -108,13 +108,19 @@ function drush_expire_absolute_url() {
function drush_expire_internal_path() {
// Get drush params.
- $internal_paths = drush_get_arguments();
- unset($internal_paths[0]);
+ $paths = drush_get_arguments();
+ unset($paths[0]);
- foreach ($internal_paths as &$path) {
- $path = $path === 'FRONT' ? '<front>' : $path;
+ $internal_paths = array();
+ foreach ($paths as &$path) {
+ if ($path === 'FRONT') {
+ $internal_paths += ExpireAPI::getFrontPageUrls();
+ }
+ else {
+ $internal_paths[] = $path;
+ }
}
-
+
// Expire internal paths.
ExpireAPI::executeExpiration($internal_paths);
}