Skip to content
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

docs: improve caching docs #1422

Merged
merged 3 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions docs/advanced/explain_info_command.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,8 @@ In that case, if pixi cannot find the `__cuda` virtual package on your machine t

### Cache dir

Pixi caches all previously downloaded packages in a cache folder.
This cache folder is shared between all pixi projects and globally installed tools.
Normally the locations would be:

1. XDG compliant cache folder when it's available (`$XDG_CACHE_HOME/pixi`
or `$HOME/.cache/pixi`)
2. Platform-specific default cache folder:
- Linux: `$XDG_CACHE_HOME/rattler` or `$HOME`/.cache/rattler
- macOS: `$HOME`/Library/Caches/rattler
- Windows: `%APPDATA%\rattler`

When your system is filling up you can easily remove this folder.
It will re-download everything it needs the next time you install a project.
The directory where pixi stores its cache.
Checkout the [cache documentation](../features/environment.md#caching) for more information.

### Auth storage

Expand Down
17 changes: 14 additions & 3 deletions docs/features/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,21 @@ This will always be slower than the pure conda solves. So for the best pixi expe

## Caching

Pixi caches the packages used in the environment.
So if you have multiple projects that use the same packages, pixi will only download the packages once.
Pixi caches all previously downloaded packages in a cache folder.
This cache folder is shared between all pixi projects and globally installed tools.

Normally the locations would be:
Platform-specific default cache folder:
- Linux: `$XDG_CACHE_HOME/rattler` or `$HOME/.cache/rattler`
- macOS: `$HOME/Library/Caches/rattler`
- Windows: `%LOCALAPPDATA%\rattler`

The cache is located in the `~/.cache/rattler/cache` directory by default.
This location is configurable by setting the `PIXI_CACHE_DIR` or `RATTLER_CACHE_DIR` environment variable.

When you want to clean the cache, you can simply delete the cache directory, and pixi will re-create the cache when needed.

The cache contains multiple folders concerning different caches from within pixi.
- `pkgs`: Contains the downloaded/unpacked `conda` packages.
- `repodata`: Contains the `conda` repodata cache.
- `uv-cache`: Contains the `uv` cache. This includes multiple caches, e.g. `built-wheels` `wheels` `archives`
- `http-cache`: Contains the `conda-pypi` mapping cache.
Loading