DEV Community

Rohit Das
Rohit Das

Posted on

What do you use Redis for?

I was writing a blog post about Redis.

I want my friends and new devs to know:

  • How they can reduce their database costs* by adding Redis to the tech stack.
  • How they can use Redis to save development time.

*These costs include both Cash and Performance.

To give them ideas on how they can use Redis, I could only come up with the following-

  • Cache - I use Redis as a Full Page Cache.
  • Persistent Database - For a small project, it is the only database I use. Free 30mb Redis enterprise is helpful.
  • Counter - Leader Boards, Simple analytics
  • Session Storage - php $_SESSION, express session
  • Message Broker: Real-Time stuff. Like sending not so important notification.
  • Queue - Run a CRON job and process queue at regular interval.

Can you guys share what you use it for?

It can be anything, including the ones I mentioned above.
Also, share your experience while using it πŸ™πŸ½.

P.S.- Crazy Ideas are 🎁 for 🧠

Top comments (4)

Collapse
 
canro91 profile image
Cesar Aguirre

Mainly for caching purposes. I have used Redis to cache the ouput from services retrieving a document object from a NoSql document store

Collapse
 
therohitdas profile image
Rohit Das

Thanks, Cesar!
Was it easy to implement in your favourite programming language?
How long do you store the object in the cache?

Collapse
 
canro91 profile image
Cesar Aguirre

Yes, it is easy to implement caching with ASP.NET Core these days. I made a post about it :)

Last time I use caching with Redis was to store configuration objects, we kept them for an hour

Collapse
 
rhymes profile image
rhymes

Forem uses Redis for server side caching, storing sessions and as the backend for the queueing system πŸ˜€