Every e-commerce application starts with a product catalog. An efficient product catalog should be able to store huge lists of products, each with their own different attributes. The schemaless design of Redis comes in handy in this regard as it allows you to create a flexible design structure that stores all the necessary values in hashes.
Consider the following case in which we want to store information about a set of books in our catalog. The information in the following table needs to be stored as part of our catalog information:
We can store this information in hashes with all of the attributes as a field:
HMSET catalog:book:9781783280216 title "Instant Redis Persistence [Instant]" author "Matt Palmer" language "English" release-date "December 2013" price "11" URL "http://www.packtpub.com/redis-persistence/book" available_format "Ebook" HMSET catalog:book:9781782164807 title "Instant Redis Optimization How-to [Instant]" author "Arun Chinnachamy" language "English" release...