This repository has been archived by the owner on Jun 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Rework how we cache APKs Rather than caching the entire APK, we will cache the APK sections separately. It is trivial to recombine them using cat to produce the exact original APK, so we don't lose any data. Doing this gives us two useful things: 1. The process of splitting the APK is relatively expensive, as we have to parse the targz stream to know where to split, exactly. 2. The individual sections have content hashes in the APK data model, so we can use those hashes as keys in the cache (filenames). When we write to the cache, we compute the hashes ourselves, so we get cache invalidation for free. Signed-off-by: Jon Johnson <jon.johnson@chainguard.dev> * Add context around generated checksum to tests This will make it possible to regenerate the Checksum byte slice if things change for any reason. Signed-off-by: Jon Johnson <jon.johnson@chainguard.dev> --------- Signed-off-by: Jon Johnson <jon.johnson@chainguard.dev>
- Loading branch information
1 parent
b216a5e
commit eda0bb8
Showing
6 changed files
with
368 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.