Skip to content

Commit 6629365

Browse files
paulrdexpez
authored andcommitted
Don't force network request when initializing cache
1 parent e8a900a commit 6629365

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

clj-refactor.el

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2173,6 +2173,13 @@ If it's present KEY indicates the key to extract from the response."
21732173
(when cljr--debug-mode
21742174
(message "Artifact cache updated")))))
21752175

2176+
(defun cljr--init-artifact-cache ()
2177+
(cljr--call-middleware-async (cljr--create-msg "artifact-list"
2178+
"force" "false")
2179+
(lambda (_)
2180+
(when cljr--debug-mode
2181+
(message "Artifact cache updated")))))
2182+
21762183
(defun cljr--dictionary-lessp (str1 str2)
21772184
"return t if STR1 is < STR2 when doing a dictionary compare
21782185
(splitting the string at numbers and doing numeric compare with them).
@@ -3280,7 +3287,7 @@ warning by customizing `cljr-suppress-no-project-warning'.)"))))
32803287
(ignore-errors
32813288
(when (cljr--middleware-version) ; check if middleware is running
32823289
(when cljr-populate-artifact-cache-on-startup
3283-
(cljr--update-artifact-cache))
3290+
(cljr--init-artifact-cache))
32843291
(when (and (not cljr-warn-on-eval)
32853292
cljr-eagerly-build-asts-on-startup)
32863293
(cljr--warm-ast-cache)))))

0 commit comments

Comments
 (0)