feat: save downloaded packages to cache#270
Merged
Merged
Conversation
7e5c6a4 to
5f47100
Compare
fc9057f to
a78d96d
Compare
scastlara
approved these changes
Aug 22, 2025
| }, | ||
| } | ||
| file_handler.file_path.parent.mkdir(parents=True, exist_ok=True) | ||
| file_handler.write(json.dumps(trusted_data, indent=2)) |
Collaborator
There was a problem hiding this comment.
We might as well save it without any indent and maybe single line? for disk size? idk
Collaborator
Author
There was a problem hiding this comment.
I've removed the indents!
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the possibility to save the downloaded trusted packages to a local cache file, to speed up runs.
This will mostly benefit local use of
twynand not so much the use in CI. That's why we assume the timezone will remain the same.To disable cache usage one can run
twyn --no-cache. Otherwise the cache will be used.The capability of disabling/enabling cache via the config file will come in a future PR, as well as the possiblity of completely erasing it.
Refs #143