Function: cider--cache-session-project-dir
cider--cache-session-project-dir is a byte-compiled function defined
in cider-session.el.
Signature
(cider--cache-session-project-dir)
Documentation
Cache the current connection's project directory for session matching.
Called from cider--connected-handler once per new connection. The
project directory is stored on the connection's process under
:cached-project-dir, resolved via file-truename and with a trailing
slash, so that cider--sesman-friendly-session-p can match buffers with
a cheap string-prefix-p check on the hot redisplay path instead of
resolving symlinks on every call.
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-session.el
(defun cider--cache-session-project-dir ()
"Cache the current connection's project directory for session matching.
Called from `cider--connected-handler' once per new connection. The
project directory is stored on the connection's process under
`:cached-project-dir', resolved via `file-truename' and with a trailing
slash, so that `cider--sesman-friendly-session-p' can match buffers with
a cheap `string-prefix-p' check on the hot redisplay path instead of
resolving symlinks on every call."
(when-let* ((proc (get-buffer-process (current-buffer)))
(proj-dir (buffer-local-value 'nrepl-project-dir (current-buffer))))
(process-put proc :cached-project-dir
(file-name-as-directory (file-truename proj-dir)))))