Function: projection--cache-put
projection--cache-put is a natively compiled function defined in
projection-core-cache.el.
Signature
(projection--cache-put PROJECT KEY VALUE &optional CACHE)
Documentation
Update the entry for KEY to VALUE in the projection cache for PROJECT.
When CACHE is given retrieve the entry from CACHE instead of
projection--project-cache. Set PROJECT to 'query to auto find
the current project.
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-put (project key value &optional cache)
"Update the entry for KEY to VALUE in the `projection' cache for PROJECT.
When CACHE is given retrieve the entry from CACHE instead of
`projection--project-cache'. Set PROJECT to \\='query to auto find
the current project."
(or cache (setq cache projection--project-cache))
(when (eq project 'query)
(setq project (projection--current-project)))
(let ((project-key (projection--cache-key project)))
(if-let* ((existing (gethash project-key cache)))
(if-let* ((pair (assq key existing)))
(setcdr pair value)
(setcdr existing
(append `((,key . ,value)
,@(cdr existing)))))
(puthash project-key `((,key . ,value)) cache)))
value)