Page MenuHomeSoftware Heritage
Paste P1495

from cache
ActivePublic

Authored by ardumont on Oct 12 2022, 1:12 PM.
(defun from-cache (wdir dir id)
"Read cache information from *working-directory*/<DIR>/<ID>"
(let ((cache-path (format nil "~A/~A/~A" wdir dir id)))
(when (probe-file cache-path)
(with-open-file (stream cache-path)
(read stream)))))
(setf *repositories-cache*
(from-cache "/var/tmp/forgerie/phabricator" "everything" "repositories"))
(forgerie-core:vc-repository-slug (first *repositories-cache*)) ; => "puppet-environment"