Book Image

Learning Redis

By : Vinoo Das
Book Image

Learning Redis

By: Vinoo Das

Overview of this book

Table of Contents (16 chapters)
Learning Redis
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Dataset handling commands in Redis


We have seen commands used by the client program to either set data or get data in Redis but there are some useful commands that are needed to handle Redis as a datastore. These commands help in maintaining Redis in the production environment and are usually the domain of the Redis administration. Since these commands have an impact on the data stored in Redis, one should be careful in executing them. Following are some of the commands:

  • FLUSHDB: This command deletes all the keys (and their held data) in the chosen database. As we have seen, in Redis we can create a database which is more like a SILO wherein we can store data in a segregated manner (more like separation of concern). This command never fails.

  • FLUSHALL: This command deletes all of the keys in all the databases in Redis node. This command never fails.

  • MONITOR: This command is a debugging command that relays all the commands that the Redis server is processing. You can either use the Redis-cli...