# `Cache.Redis`
[🔗](https://github.com/mikaak/elixir_cache/blob/main/lib/cache/redis.ex#L1)

Redis adapter for distributed caching with ElixirCache.

This adapter provides a connection pool to Redis, enabling distributed caching
across multiple nodes or services. It supports the standard Cache behavior plus
additional Redis-specific operations like hash manipulation, JSON operations, and sets.

## Features

* Connection pooling for efficient Redis access
* Support for Redis URI connection strings
* Hash operations for storing field-value pairs within a key
* JSON operations for working with complex nested data structures
* Set operations for managing collections
* Direct access to Redis commands via pipeline and command functions

## Options
* `:uri` (`t:String.t/0`) - Required. The connection uri to redis

* `:size` (`t:pos_integer/0`) - The amount of workers in the pool

* `:max_overflow` (`t:pos_integer/0`) - The amount of max overflow the pool can handle

* `:strategy` - The type of queue to use for poolboy

## Example

```elixir
defmodule MyApp.RedisCache do
  use Cache,
    adapter: Cache.Redis,
    name: :my_app_redis_cache,
    opts: [
      uri: "redis://localhost:6379",
      size: 10,
      max_overflow: 5
    ]
end
```

# `command`

# `command!`

# `hash_delete`

# `hash_get`

# `hash_get_all`

# `hash_get_many`

# `hash_scan`

# `hash_set`

# `hash_set_many`

# `hash_values`

# `json_array_append`

# `json_clear`

# `json_delete`

# `json_get`

# `json_incr`

# `json_set`

# `ms_to_nearest_sec`

# `native_term_storage?`

Redis stores bytes on the wire. Terms must be serialised before they leave the node,
so this adapter always encodes.

# `pipeline`

# `pipeline!`

# `pool_config`

# `sadd`

# `scan`

# `smembers`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
