There may be some features that we might want to implement, but do not want to have a persistent storage for them. So, we would like to have these stored in cache-like storage for some time and then vanish, for example, showing a list of the recently visited products to the visitors on the website. In this recipe, we will understand how to use Redis as an effective cache to store non-persistent data that can be accessed at a high speed.
Indexing model data with Redis
Getting ready
We will do this with the help of Redis, which can be installed using the following command:
$ pip3 install redis
Make sure that you run the Redis server for the connection to happen. To install and run a Redis server, refer to http://redis.io...