   (let ((file-name-handler-alist nil)
         (coding-system-for-write 'binary)
         (write-region-annotate-functions nil)
-        (write-region-post-annotation-function nil)
-        (data (doom--store-init location)))
-    (make-directory doom-store-dir 'parents)
-    (with-temp-file (expand-file-name location doom-store-dir)
-      (prin1 data (current-buffer)))
-    data))
+        (write-region-post-annotation-function nil))
+    (let* ((location (or location doom-store-location))
+           (data (doom--store-init location)))
+      (make-directory doom-store-dir 'parents)
+      (with-temp-file (expand-file-name location doom-store-dir)
+        (prin1 data (current-buffer)))
+      data)))
 
 
 ;;;###autoload
 (defun doom-store-get (key &optional location default-value noflush)
   "Retrieve KEY from LOCATION (defaults to `doom-store-location').
 If it doesn't exist or has expired, DEFAULT_VALUE is returned."
-  (let ((location (or location doom-store-location))
-        (data (gethash key (doom--store-init location) default-value)))
+  (let ((data (gethash key (doom--store-init location) default-value)))
     (if (not (or (eq data default-value)
                  (doom--store-expired-p key data)))
         (cdr data)

;;;###autoload
(defun doom-store-clear (&optional location)
  "Clear the store at LOCATION (defaults to `doom-store-location')."
  (cl-check-type location (or null string))
  (let* ((location (or location doom-store-location))
         (path (expand-file-name location doom-store-dir)))
    (remhash location doom--store-table)

LOCATION is the super-key to store this cache item under. It defaults to
`doom-store-location'."
  (cl-check-type ttl (or null integer function))
  (puthash key (cons (if (integerp ttl)
                         (time-add (current-time) ttl)
                       ttl)
                     value)
           (doom--store-init location))
  (unless noflush
    (doom--store-flush location)))

;;;###autoload
(defun doom-store-rem (key &optional location noflush)
  "Clear a cache LOCATION (defaults to `doom-store-location')."
  (remhash key (doom--store-init location))
  (unless noflush
    (doom--store-flush location)))

;;;###autoload
(defun doom-store-member-p (key &optional location)
