# Aspire.Hosting.Redis

- Module: `Aspire.Hosting.Redis`
- Version: `17.0.0`
- Import path: `apphost/modules/aspire`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)
- Functions: `14`
- Types: `3`

## Handles

- [RedisCommanderResource](/reference/api/go/aspire.hosting.redis/rediscommanderresource.md) -- `handle` - 1 members
- [RedisInsightResource](/reference/api/go/aspire.hosting.redis/redisinsightresource.md) -- `handle` - 3 members
- [RedisResource](/reference/api/go/aspire.hosting.redis/redisresource.md) -- `handle` - 17 members -- A resource that represents a Redis resource independent of the hosting model.

## Functions

- [AddRedis](/reference/api/go/aspire.hosting.redis/addredis.md) -- `method` - on `DistributedApplicationBuilder` -- Adds a Redis container to the application model.
- [WithHostPort](/reference/api/go/aspire.hosting.redis/withhostport-rediscommanderresource-float64.md) -- `method` - on `RedisCommanderResource` -- Configures the host port that the Redis Commander resource is exposed on instead of using randomly assigned port.
- [WithDataBindMount](/reference/api/go/aspire.hosting.redis/withdatabindmount-redisinsightresource-string.md) -- `method` - on `RedisInsightResource` -- Adds a bind mount for the data folder to a Redis Insight container resource.
- [WithDataVolume](/reference/api/go/aspire.hosting.redis/withdatavolume-redisinsightresource-noargs.md) -- `method` - on `RedisInsightResource` -- Adds a named volume for the data folder to a Redis Insight container resource.
- [WithHostPort](/reference/api/go/aspire.hosting.redis/withhostport-redisinsightresource-float64.md) -- `method` - on `RedisInsightResource` -- Configures the host port that the Redis Insight resource is exposed on instead of using randomly assigned port.
- [WithDataBindMount](/reference/api/go/aspire.hosting.redis/withdatabindmount-redisresource-string.md) -- `method` - on `RedisResource` -- Adds a bind mount for the data folder to a Redis container resource and enables Redis persistence.
- [WithDataVolume](/reference/api/go/aspire.hosting.redis/withdatavolume-redisresource-noargs.md) -- `method` - on `RedisResource` -- Adds a named volume for the data folder to a Redis container resource and enables Redis persistence.
- [WithHostPort](/reference/api/go/aspire.hosting.redis/withhostport-redisresource-float64.md) -- `method` - on `RedisResource` -- Configures the host port that the Redis resource is exposed on instead of using randomly assigned port.
- [WithModule](/reference/api/go/aspire.hosting.redis/withmodule.md) -- `method` - on `RedisResource` -- Configures the Redis resource to use the specified Redis module by providing its path inside the container.
- [WithPassword](/reference/api/go/aspire.hosting.redis/withpassword.md) -- `method` - on `RedisResource` -- Configures the password that the Redis resource is used.
- [WithPersistence](/reference/api/go/aspire.hosting.redis/withpersistence.md) -- `method` - on `RedisResource` -- Configures a Redis container resource for persistence.
- [WithRedisCommander](/reference/api/go/aspire.hosting.redis/withrediscommander.md) -- `method` - on `RedisResource` -- Adds Redis Commander management UI
- [WithRedisInsight](/reference/api/go/aspire.hosting.redis/withredisinsight.md) -- `method` - on `RedisResource` -- Adds Redis Insight management UI
- [WithRepl](/reference/api/go/aspire.hosting.redis/withrepl.md) -- `method` - on `RedisResource` -- Adds a REPL command that opens an authenticated Redis shell in the dashboard terminal dock.

## Exported values

- `RedisModules.BloomFilter`: `string` = `"/usr/local/lib/redis/modules/redisbloom.so"` -- The Redis Bloom Filter module path for probabilistic data structures including Bloom filters, Cuckoo filters, Count-Min Sketches, and Top-K filters.
- `RedisModules.Json`: `string` = `"/usr/local/lib/redis/modules/rejson.so"` -- The Redis JSON module path for storing, updating, and querying JSON documents in Redis.
- `RedisModules.Search`: `string` = `"/usr/local/lib/redis/modules/redisearch.so"` -- The Redis Search module path for secondary indexing and querying of data stored in Redis.
- `RedisModules.TimeSeries`: `string` = `"/usr/local/lib/redis/modules/redistimeseries.so"` -- The Redis TimeSeries module path for efficient storage and querying of time series data in Redis.
