To add a Redis service to your project, add an entry to your project's services.yaml
file.
For an ephemeral service, use type redis
.
For persistent Redis, use redis-persistent
.
To give your app(s) access to this service, create a relationship pointing to it of type redis
.
Configuration example:
.platform/services.yaml
cacheredis:
type: redis:7.0
.platform.app.yaml
relationships:
rediscache: "cacheredis:redis"
# If using PHP
runtime:
extensions:
- redis
For more information on this feature, please see the following page in the Platform.sh documentation: