-
-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a hatch cache
command to manage cached data
#1457
Comments
I've been experimenting with environments - and specifically with not storing environments in the project directory (which is my normal preference). All of the commands proposed above would be equally useful for project environments, as well as for script environments. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hatch caches data on behalf of the user. This idea came up when discussing environments created as part of
hatch run <script>
. I don't know if there is other cached data that could benefit from this command, but the following could be useful for managing script environments.This list is a bit "off the top of my head" - I can think of use cases for all of these, but there may be other possibilities as well, or there may be better ways of structuring the subcommands.
hatch cache dir
- print the location of the cache directory.hatch cache prune
- remove cached environments that relate to scripts that no longer exist on disk.hatch cache purge
- remove all cached environments, forcing them to be recreated when next needed.hatch cache find <script>
- print the location of the environment directory for <script>.hatch cache list
- list the contents of the cache (environment directory, associated script, disk space used).This is modeled after the functionality provided by the
uv cache
andpip cache
commands.The text was updated successfully, but these errors were encountered: