Step by step, following the numbers
- Apps in the same Project connect with
server-name.internalon port 6379. If you link the cache to a container, aredis://DATABASE_URLis set for you. - To connect from outside, turn on the public endpoint, add allowed IPs, and connect over TLS with SNI (
rediss://). - Data is in RAM and written to disk every second, so it survives a restart. The data file is backed up on the schedule you set.
- To restore, open a ticket and our team restores it from a backup for you.
What a cache is good for
- Sessions of signed-in users, so every instance of your app sees the same data.
- Caching results you read from the database often or that take long to work out, so pages load faster.
- Job queues and counters, such as sending email in the background or limiting how often an API can be called.
Don’t use a cache as your main data store. If the data grows past the RAM you chose, nothing more can be written. Keep important data in a Managed Database, and set keys to expire.