# cache

Manage registry cache

Canonical URL: https://docs.paradoc.dev/cli/commands/cache/

Manages the registry data cache used to speed up registry operations.

## Usage

```bash
paradoc cache <command> [options]
```

## Subcommands

| Command      | Description                              |
| ------------ | ---------------------------------------- |
| `clear`      | Clear all cached registry data           |
| `stats`      | Show cache statistics (alias: `info`)    |
| `invalidate` | Invalidate cache for a specific registry |
| `config`     | Show current cache configuration         |
| `reset`      | Reset cache configuration to defaults    |

***

## cache clear

Clear all cached registry data.

```bash
paradoc cache clear
```

### Output

```
✓ Cleared 12 cached entries
```

***

## cache stats

Show cache statistics.

```bash
paradoc cache stats [options]
```

`paradoc cache info` is an alias.

### Options

| Option   | Description    |
| -------- | -------------- |
| `--json` | Output as JSON |

### Output

```
Cache Statistics

Directory: ~/.paradoc/cache
Default TTL: 1h
Disk entries: 12
Total size: 45.2 KB
```

***

## cache invalidate

Invalidate cache for a specific registry.

```bash
paradoc cache invalidate <namespace>
```

### Arguments

| Argument    | Description                                      |
| ----------- | ------------------------------------------------ |
| `namespace` | Registry namespace to invalidate (e.g., `@acme`) |

### Example

```bash
paradoc cache invalidate @acme
```

***

## cache config

Show current cache configuration.

```bash
paradoc cache config [options]
```

### Options

| Option   | Description    |
| -------- | -------------- |
| `--json` | Output as JSON |

### Output

```
Cache Configuration

Effective directory: ~/.paradoc/cache

Global config:
  TTL: 1h

Project config:
  (not configured)
```

***

## cache reset

Reset cache configuration to defaults.

```bash
paradoc cache reset [options]
```

### Options

| Option    | Description                |
| --------- | -------------------------- |
| `--clear` | Also clear all cached data |

### Output

```
✓ Cache configuration reset to defaults

Default settings:
  TTL: 3600s (1 hour)
  Directory: ~/.paradoc/cache
```

## See also

* [configure](/cli/commands/configure) - Interactive configuration wizard
* [reset](/cli/commands/reset) - Reset CLI to factory defaults
