Function: projection-cache-clear--read-cache-vars

projection-cache-clear--read-cache-vars is a natively compiled function defined in projection-core-cache.el.

Signature

(projection-cache-clear--read-cache-vars &optional READ-MULTIPLE)

Documentation

Read cache vars for the current project.

Returns a list of the current project the cache-var and the cache table it is set in. When READ-MULTIPLE allow selecting multiple cache vars and return pairs of key and cache-tables instead.

Source Code

;; Defined in /nix/store/j6y921qbdmdqxjnd43iibapbig3p4hai-emacs-packages-deps/share/emacs/site-lisp/elpa/projection-20260614.1822/projection-core-cache.el
(defun projection-cache-clear--read-cache-vars (&optional read-multiple)
  "Read cache vars for the current project.
Returns a list of the current project the cache-var and the cache table it is
set in. When READ-MULTIPLE allow selecting multiple cache vars and return pairs
of key and cache-tables instead."
  (let* ((project (projection--current-project))
         (cache-vars (projection--list-cache-vars project))
         (selected-cache-vars
          (funcall
           (if read-multiple #'completing-read-multiple #'completing-read)
           (projection--prompt "Clear cache: " project)
           (projection--cache-vars-completion-table cache-vars)
           nil 'require-match)))
    (append (list project)
            (if read-multiple
                (cl-loop for selected-cache-var in selected-cache-vars
                         collect (cddr (alist-get selected-cache-var cache-vars nil nil #'string-equal)))
              (cddr (alist-get selected-cache-vars cache-vars nil nil #'string-equal))))))