   (setq intero-check-last-mod-time nil
         intero-check-last-results nil)
   (flycheck-mode))
+
+(defun intero-check-calculate-hash ()
+  "Calculate a hash for the current buffer that will change when it needs re-checking."
+  (secure-hash
+   'md5
+   (concat (prin1-to-string intero-start-time) ; Force re-check after intero-restart
+           (buffer-substring-no-properties (point-min) (point-max)))))
 
 (defun intero-check (checker cont)
   "Run a check with CHECKER and pass the status onto CONT."

                 (let ((results (cl-remove-if (lambda (msg)
                                                (eq 'splice (flycheck-error-level msg)))
                                              msgs)))
                   (setq intero-check-last-mod-time (plist-get state :mod-time)
                         intero-check-last-results results)
                   (funcall (plist-get state :cont) 'finished results))
                 (when compile-ok

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Flycheck integration

(defvar-local intero-check-last-hash nil
  "Most recent hash for the current buffer when flycheck was last triggered.")

(defvar-local intero-check-last-results nil
  "Most recent flycheck results for the current buffer.")

(defun intero-check-reuse-last-results (hash cont)
  "If HASH is not new, return non-nil and call CONT with `intero-check-last-results'."
  (let ((reuse (and intero-check-last-hash
                    (equal hash intero-check-last-hash))))
    (progn
      (when reuse
        (funcall cont 'finished intero-check-last-results))
