© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
A. SaccoBeginning Spring Datahttps://doi.org/10.1007/978-1-4842-8764-4_7

7. Redis: Key/Value Database

Andres Sacco1  
(1)
Buenos Aires, Buenos Aires, Argentina
 

Sometimes, you need to persist complex objects in a database and/or for a long period of time. Under these circumstances, the key/value store acts more or less as the Map<K,V> class, wherein you need a key to obtain the values, but the key doesn’t need to be a string. It can be another type, and the value can be a simple string or a complex object.

Redis 1 or Memcached2 are examples of this type of database, which you can use with another module of Spring Boot, such as a cache mechanism.

The main difference ...

Get Beginning Spring Data: Data Access and Persistence for Spring Framework 6 and Boot 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.