Skip to content

Commit 945ddcc

Browse files
committed
Implemented async cache clear.
Fixes #60.
1 parent 4bd5283 commit 945ddcc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drupal-mode.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,10 @@ of the project)."
371371
(if (and drupal-rootdir
372372
drupal-drush-program)
373373
(let ((root drupal-rootdir))
374-
(with-temp-buffer
375-
(message "Clearing all caches...")
376-
(call-process drupal-drush-program nil nil nil (concat "--root=" (expand-file-name root)) "cache-clear" "all")
377-
(message "Clearing all caches...done")))
374+
(message "Clearing all caches...")
375+
(if (fboundp 'async-start-process)
376+
(async-start-process "drush cache-clear all" drupal-drush-program '(lambda (process-object) (message "Clearing all caches...done")) (concat "--root=" (expand-file-name root)) "cache-clear" "all")
377+
(call-process drupal-drush-program nil 0 nil (concat "--root=" (expand-file-name root)) "cache-clear" "all")))
378378
(message "Can't clear caches. No DRUPAL_ROOT and/or no drush command.")))
379379

380380
(defun drupal-drush-php-eval ()

0 commit comments

Comments
 (0)