> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ooneex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# cache:create

> Generate a new cache class.

Scaffolds a cache adapter class and its test file into the target module. It writes `modules/<module>/src/cache/<Name>Cache.ts` and `modules/<module>/tests/cache/<Name>Cache.spec.ts`, and installs the `@ooneex/cache` dependency if it is missing.

## Usage

```bash theme={null}
ooneex cache:create [options]
```

## Examples

```bash theme={null}
ooneex cache:create
```

```bash theme={null}
ooneex cache:create --name=UserSession
```

```bash theme={null}
ooneex cache:create --name=ProductCatalog --module=catalog --override
```

## Options

| Option       | Description                                                   | Default             |
| ------------ | ------------------------------------------------------------- | ------------------- |
| `--name`     | Resource name (the `Cache` suffix is appended automatically). | Prompted if omitted |
| `--module`   | Target module.                                                | `shared`            |
| `--override` | Overwrite an existing file without confirmation.              | `false`             |

## AI Skill

This command ships a matching `cache:create` skill. Your AI agent uses it to generate a new cache adapter class and its test file, then implement `get`, `set`, `delete`, and `has` for the `ICache` interface from `@ooneex/cache`.

<Tabs>
  <Tab title="Claude">
    ```bash theme={null}
    ooneex claude:init
    ```
  </Tab>

  <Tab title="Codex">
    ```bash theme={null}
    ooneex codex:init
    ```
  </Tab>
</Tabs>
