
Reduce latency in Spring Boot apps by distributed caching with Redis, speeding data fetch from network services and third-party APIs, while enabling auto scalable microservices and session state management.
Learn how distributed caching shares data across apps and regions, and how cap theorem drives choices about consistency, availability, and eventual data reliability.
Discover why Redis is a blazing fast distributed cache and a rich data platform, offering Ready Search, JSON, graph, time series, streams, pubsub, and Redisai capabilities beyond caching.
Explore popular caching needs and inline versus not inline cache patterns for read, write, and session data, in a Spring Boot REST API demo.
Demonstrates building a Spring Boot rest API connected to MySQL and Google Books API, configures a RestTemplate and JPA, and prepares Redis caching to reduce latency.
Enable caching with Spring Data Redis and configure a global cache prefix. Learn to use cacheable with keys via SpEL on service methods and observe cache hits and misses.
Cache only when outputs are deterministic and data rarely changes, using unique keys like account IDs or NP; beware stale data, cache hits and misses, TTL issues, and cross-application updates.
Learn redis ACL and RBAC security, including policy components, user attributes, and command restrictions, then implement secure spring boot clients via application properties.
Demonstrate configuring Redis-based access control in a Spring Boot app by creating users with prefix-specific permissions (demo cache and music), authenticating via CLI, and validating restricted read access.
Explore how RediSearch and RedisJSON enable indexing and fast search of JSON documents in Ready Stack, using JSONPath queries, prefixes, and index-based lookups.
Explore how session data enables fast access and business continuity in cloud-native apps. Externalizing HTTP sessions with Spring Session and Redis supports high availability and horizontal scaling.
Demonstrates implementing web session data caching with Redis in a Spring Boot Thymeleaf app, showing how session persistence, Redis keys, TTL, and cleanup affect user experience.
Below is the deck that provides the content covered in the course, which has links to Github, and links to other resources shown in the wrap-up, for further exploration.
This is a 2 hours free crash course on implementing distributed cashing with Redis in SpringBoot Apps, developed in 3 parts (and 6 sections). This is implementation & demo oriented course.
In Part1, we will cover the overview of Distributed Caching" and "Redis", various Read Write Caching Patterns & Pitfalls. We will conclude with a demo, by implementing R/W cache patterns in SpringBoot REST API, using Spring-Data-Redis.
Part-1 : Various R/W Cache Patterns
Introduction
Session Overview
Tools and Software required
Distributed Caching Overview (& expectations from cache manager)
Why Redis ?
Popular R/W Caching Patterns
Redis Client: Java Cache Providers (and JSR107 and Spring Cache Abstraction)
Demo over view
Demo Build the Spring Boot APIs (with no cache)
Test (nocache) APIs with Postman
Add Caching feature to code
Test caching (postman, redis-cli monitor, RedisInsight)
Points to keep in mind while considering caching & Sample good use cases
Common Pitfalls
Part-2.1 : Security (ACLs)
Security and access control lists (ACLs) in Redis,
Demonstrate security implementation in the springboot app we built in Part-1
Part-2.2 : Redis Modules (RedisJSON & RedisSearch)
Quick demo using RedisJSON and RedisSearch.
Part-3.1 Caching Web Session Data
An overview of Web Session Data
Demonstrates the implementation using Spring-Session-Data-Redis with in a SpringBoot Web Application
Part-3.2 Cache Eviction Policies and TTL (Server and Client Side)
Introduces Eviction Policies and TTL concepts. Concludes by implementing and demoing this using applications we built in Part-1 (Rest APs) and Part-3 (web application).
Resources and Material
Final section includes the resources (i.e. Git repo link to the code, deck ) and links and resources for further & deeper study.