Skip to content

Commit

Permalink
docs: improve caching docs (prefix-dev#1422)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruben-arts authored May 22, 2024
1 parent e80d097 commit 6ee05c1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
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.

0 comments on commit 6ee05c1

Please sign in to comment.