From d5722c5f4e52109956da6b222a5e2b8027a97967 Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Mon, 6 Apr 2015 11:28:22 -0300 Subject: [PATCH] Update comment and get rid of related drupal_is_cli() call. --- islandora.module | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/islandora.module b/islandora.module index c3ed6fbd..cb533ec3 100644 --- a/islandora.module +++ b/islandora.module @@ -2105,7 +2105,10 @@ function islandora_conditionally_clear_cache() { $functions = array( // Object changes in response to a form. 'form_execute_handlers' => 'islandora_clear_cache_all', - // Object changes in response to a batch. + // Object changes in response to a batch. Note that this will not match on + // a drush batch, as drush uses a different set of functions to run + // batches. We intentionally do not clear batches in response to drush + // batches, since they are not in response to GUI actions. '_batch_process' => 'islandora_schedule_cache_clear_for_batch', ); @@ -2145,10 +2148,9 @@ function islandora_schedule_cache_clear_for_batch() { $scheduled = isset($scheduled) || isset($batch['islandora_cache_clear_scheduled']); - if ($scheduled || !isset($batch['id']) || drupal_is_cli()) { + if ($scheduled || !isset($batch['id'])) { // We do not wish to do anything if we are either already scheduled or the - // batch is not running. Also, if the batch is running on the CLI (via drush - // or otherwise). + // batch is not running. return; }