summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Lutfy2014-12-17 15:32:30 (GMT)
committerMathieu Lutfy2014-12-17 15:32:30 (GMT)
commit49e60efdef65865a0cfd198eb4268dabd76f4bef (patch)
tree3a1ed9846ca29ae110cf00f890a2db37bec97e97
parent6d289160b0951d2e050dfdeaac34c3e93c94f900 (diff)
Issue #517962: Drush integration.
-rw-r--r--boost.drush.inc25
1 files changed, 25 insertions, 0 deletions
diff --git a/boost.drush.inc b/boost.drush.inc
new file mode 100644
index 0000000..1a97af8
--- /dev/null
+++ b/boost.drush.inc
@@ -0,0 +1,25 @@
+<?php
+
+/**
+ * @file
+ * Drush commands for Boost.
+ */
+
+/**
+ * Implements hook_drush_cache_clear.
+ */
+function boost_drush_cache_clear(&$types) {
+ $types['boost'] = 'boost_drush_cache_clear_all';
+}
+
+/**
+ * Clears all Boost cached data.
+ */
+function boost_drush_cache_clear_all() {
+ $ignore = variable_get('boost_ignore_flush', 0);
+ $GLOBALS['conf']['boost_ignore_flush'] = 0;
+
+ boost_flush_caches();
+
+ $GLOBALS['conf']['boost_ignore_flush'] = $ignore;
+}