# keryn cache path

Describes Keryn 0.5.2 and keryn-rules 0.8.0.

> keryn cache path: the rescan cache: results of an unchanged tree are reused; clear deletes them

Source: https://keryn.dev/docs/reference/cli/cache-path/

The rescan cache: results of an unchanged tree are reused; clear deletes them.

```text
keryn cache path
```

## Options

```text
Usage: keryn cache <clear | stats | path>
  Scans of an unchanged tree are answered from a local cache (reports of code on this machine, never tokens); '--no-cache' or
  KERYN_NO_CACHE=1 skips it for one run.
  clear   delete everything the cache holds
  stats   how many entries and how many bytes
  path    the cache directory (KERYN_CACHE_DIR overrides it)
```

## Examples

```sh
# Print the directory (KERYN_CACHE_DIR overrides it).
keryn cache path
```

## Exit codes

| Code | Meaning |
|---|---|
| 0 | success |
| 2 | usage error or unreadable input |

## Environment

| Variable | Meaning | Default |
|---|---|---|
| `KERYN_CACHE_DIR` | Where the rescan cache lives. | the platform cache directory (see keryn cache path) |
| `KERYN_CACHE_MAX_MB` | Size cap of the rescan cache; least recently used files are deleted past it. | 512 |
| `KERYN_NO_CACHE` | Set to 1 to skip the rescan cache for the run (same as --no-cache). | unset |
