# smartmemo stats

# smartmemo stats

## Overview

The `stats` command displays statistics about the persisted cache store, including the total number of entries and cumulative hit counts. This command is useful for monitoring cache performance and understanding cache utilization.

## Usage

```bash
smartmemo stats [--db-path PATH]
```

## Options

### `--db-path PATH`

Path to the SQLite cache database file.

**Default:** Uses the default database path from `CacheConfig().db_path`

**Example:**
```bash
smartmemo stats --db-path /custom/path/to/cache.db
```

## Output

The command outputs a single line with the following fields:

- `entries`: Total number of cached entries in the database
- `total_hits`: Cumulative count of cache hits

**Example output:**
```
entries=42 total_hits=156
```

## Examples

### Display cache stats with default database path

```bash
smartmemo stats
```

Output:
```
entries=125 total_hits=3847
```

### Display cache stats from a custom database location

```bash
smartmemo stats --db-path ./my_cache/memory.db
```

Output:
```
entries=89 total_hits=2105
```

## See Also

- [CLI Reference](/docs/cli-reference) — Complete CLI command documentation
- [Configuration](/docs/configuration) — Database and cache configuration options
