# LogtoResource.WithRedis

- Module: [CommunityToolkit.Aspire.Hosting.Logto](/reference/api/go/communitytoolkit.aspire.hosting.logto.md)
- Defined on: [LogtoResource](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource.md)
- Version: `13.6.1`
- Kind: `method`

Configures the Logto resource to use a specified Redis resource for caching or other functionality.

## Definition

```go
type LogtoResource interface {
    // ... omitted for brevity
    WithRedis(redis RedisResource) LogtoResource
}
```

## Signature

```go
WithRedis(redis RedisResource) LogtoResource
```

## Parameters

- `redis` ([`RedisResource`](/reference/api/go/communitytoolkit.aspire.hosting.logto/redisresource.md)) -- The resource builder for the Redis resource to be used by the Logto resource.

## Returns

[`LogtoResource`](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource.md) -- The resource builder configured with the specified Redis resource.

Returns a handle; failures surface later via `Err()`.

## Defined on

- [LogtoResource](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource.md) -- `handle`
