Commit Graph

3 Commits

Author SHA1 Message Date
Sergei Zharinov 9ad78755c5 feat(cache): use binary envelopes for package cache writes (#43922)
* feat(cache): use binary envelopes for package cache writes

* feat(cache): upgrade legacy file cache entries to envelopes on read

The file backend's cleanup decides what to keep from cacache index metadata
alone, so legacy entries (which store expiry inside the payload) would all be
purged on the first sweep after upgrade, cooling the cache.

Add a best-effort `upgradeLegacyEntry` hook on the base class, overridden only
by the file backend, that rewrites a still-valid legacy entry as an envelope
with the same expiry when it is read. The working set converts itself during the
run, so it survives cleanup. Redis and SQLite govern expiry natively and inherit
the no-op default.
2026-06-29 21:08:19 +00:00
Sergei Zharinov b348ddcbb9 refactor(cache): prepare package cache for binary payloads (#43921)
Add buffer compression helpers, an envelope codec, and a legacy package-cache decoder. Hoist package
cache reads into the base backend so file, Redis, and SQLite share format detection, legacy
fallback, and corrupt-entry handling while preserving existing write formats.
2026-06-15 06:50:29 +00:00
Sergei Zharinov 6afc6e9e05 refactor(cache): Convert package cache backends to classes (#41434)
refactor(cache): extract package cache backend classes
2026-02-24 07:27:27 +00:00