# Redis Cache

This caching strategy will use your Redis instance as the storage.

To get started with this caching strategy, install it:

```bash
npm i @graphql-mesh/cache-redis
```

```bash
pnpm add @graphql-mesh/cache-redis
```

```bash
yarn add @graphql-mesh/cache-redis
```

```bash
bun add @graphql-mesh/cache-redis
```

## How to use?

```yaml
cache:
  redis:
    host: localhost
    port: '9876' # port should be a string
    password: 'MY_SECRET_PASSWORD'
```

## Config API Reference

- `host` (type: `String`)
- `port` (type: `String`)
- `username` (type: `String`)
- `password` (type: `String`)
- `db` (type: `Int`)
- `url` (type: `String`)
- `family` (type: `String`)
- `lazyConnect` (type: `Boolean`) \- Flag to indicate lazyConnect value for Redis client.

@default: true

Last updated on November 5, 2025
