Age | Commit message (Expand) | Author |
2023-07-11 | cache: 'file-expiration-time' uses 'lstat', not 'stat'....Fixes a bug whereby 'cached-channel-instance' would potentially consider
cache entries obsolete too early because they refer to items in the
store, which is mounted as 'noatime' on Guix System.
* guix/cache.scm (file-expiration-time): Use 'lstat' and
'false-if-exception' rather than 'stat'. This matches what (guix
scripts shell) does.
| Ludovic Courtès |
2022-06-04 | cache: Catch invalid 'last-expiry-cleanup'....Fixes <http://issues.guix.gnu.org/55638>.
* guix/cache.scm (maybe-remove-expired-cache-entries)[last-expiry-date]:
Use 'get-string-all' + 'string->number' instead of 'read'; ignore
invalid numbers.
* tests/cache.scm ("maybe-remove-expired-cache-entries, empty cache")
("maybe-remove-expired-cache-entries, corrupted cache"): New tests.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
| zimoun |
2021-10-25 | cache: Gracefully handle non-existent cache....* guix/cache.scm (maybe-remove-expired-cache-entries): Ignore ENOENT
when writing EXPIRY-FILE.
| Ludovic Courtès |
2021-01-13 | git: Periodically delete least-recently-used cached checkouts....This ensures ~/.cache/guix/checkouts is periodically cleaned up.
* guix/git.scm (cached-checkout-expiration)
(%checkout-cache-cleanup-period): New variables.
(delete-checkout): New procedure.
(update-cached-checkout)[cache-entries]: New procedure.
Add call to 'maybe-remove-expired-cache-entries'.
* guix/cache.scm (file-expiration-time): Add optional 'timestamp'
parameter and honor it.
| Ludovic Courtès |
2020-03-22 | Remove workaround for 'time-monotonic' in Guile 2.2.2....This is a followup to e688c2df3924423b67892cc9939ca099c729d1cb.
* build-aux/hydra/evaluate.scm <top level>: Remove 'time-monotonic'
definition.
* guix/cache.scm: Likewise.
* guix/progress.scm: Likewise.
* guix/scripts/substitute.scm: Likewise.
* guix/scripts/weather.scm: Likewise.
* tests/cache.scm: Likewise.
| Ludovic Courtès |
2017-04-22 | cache: Work around 'time-monotonic' bug in Guile 2.2.2....* guix/cache.scm (time-monotonic) [guile-2.2]: New variable.
* tests/cache.scm (time-monotonic) [guile-2.2]: Likewise.
* guix/build/download.scm (time-monotonic) [guile-2.2]: Adjust comment:
it's a 2.2.2 bug.
| Ludovic Courtès |
2017-04-18 | Add (guix cache) and use it in (guix scripts substitute)....* guix/cache.scm, tests/cache.scm: New files.
* Makefile.am (MODULES, SCM_TESTS): Add them.
* guix/scripts/substitute.scm (obsolete?): Remove.
(remove-expired-cached-narinfos): Rename to...
(cached-narinfo-expiration-time): ... this. Remove the removal part and
only keep the expiration time part.
(narinfo-cache-directories): Add optional 'directory' parameter and
honor it.
(maybe-remove-expired-cached-narinfo): Remove.
(cached-narinfo-files): New procedure.
(guix-substitute): Use 'maybe-remove-expired-cache-entries' instead of
'maybe-remove-expired-cached-narinfo'.
| Ludovic Courtès |