Apache HTTP Server Version 2.4

Apache > HTTP Server > Documentation > Version 2.4 > Modules

# Apache Module mod_socache_redis

Available Languages: en | fr

Description: | Redis based shared object cache provider.
Status: | Extension
Module Identifier: | socache_redis_module
Source File: | mod_socache_redis.c
Compatibility: | Available in Apache 2.4.39 and later

### Summary

`mod_socache_redis` is a shared object cache provider which provides for creation and access to a cache backed by the Redis high-performance, distributed memory object caching system.

This shared object cache provider's "create" method requires a comma separated list of memcached host/port specifications. If using this provider via another modules configuration (such as `SSLSessionCache`), provide the list of servers as the optional "arg" parameter.

    SSLSessionCache redis:redis.example.com:12345,redis2.example.com:12345

Details of other shared object cache providers can be found here.

### Directives

### Bugfix checklist

- httpd changelog
- Known issues
- Report a bug

### See also

- Comments

## RedisConnPoolTTL Directive

Description: | TTL used for the connection pool with the Redis server(s)
Syntax: | `RedisConnPoolTTL num[units]`
Default: | `RedisConnPoolTTL 15s`
Context: | server config, virtual host
Status: | Extension
Module: | mod_socache_redis
Compatibility: | Available in Apache 2.4.39 and later

Set the time to keep idle connections with the Redis server(s) alive (threaded platforms only).

Valid values for `RedisConnPoolTTL` are times up to one hour. 0 means no timeout.

This timeout defaults to units of seconds, but accepts suffixes for milliseconds (ms), seconds (s), minutes (min), and hours (h).

    # Set a timeout of 10 minutes
    RedisConnPoolTTL 10min
    # Set a timeout of 60 seconds
    RedisConnPoolTTL 60

## RedisTimeout Directive

Description: | R/W timeout used for the connection with the Redis server(s)
Syntax: | `RedisTimeout num[units]`
Default: | `RedisTimeout 5s`
Context: | server config, virtual host
Status: | Extension
Module: | mod_socache_redis
Compatibility: | Available in Apache 2.4.39 and later

Set the Read/Write timeout used for the connection with the Redis server(s).

Valid values for `RedisTimeout` are times up to one hour. 0 means no timeout.

This timeout defaults to units of seconds, but accepts suffixes for milliseconds (ms), seconds (s), minutes (min), and hours (h).

    # Set a timeout of 10 minutes
    RedisTimeout 10min
    # Set a timeout of 60 seconds
    RedisTimeout 60

Available Languages: en | fr

## Comments

Notice:
This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our mailing lists.