O'Reilly logo

Learning Redis by Vinoo Das

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Persistence handling in Redis

Redis provides a wide range of options for persisting data. These mechanisms help in deciding what kind of persistence model we need for our data, and that solely depends on the kind of data we want to store in Redis. The four options that we have in Redis are as follows:

  • Persisting via the RDB option
  • Persisting via the AOF option
  • Persisting via combination of AOF and RDB option
  • Not persisting at all

Let's run a simple program and see the importance of persistence mechanism, because then only we can appreciate the importance of persistence. Follow the steps and see for yourself how lack of persistence can cause data loss:

  1. Start your Redis server.
  2. Open a Redis client command prompt.
  3. Execute the command SET msg 'temporary value' ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required