OPERATING SYSTEMSOS Linux

Cache Pokemon with Spring Boot 3 and Redis

What is Redis?

Redis is an open-source, in-memory key-value database system. It stores data in memory as key-value pairs and provides high throughput, low latency data access. Redis stores data in memory, making it extremely fast for data retrieval. This makes it ideal for caching frequently accessed data, which can significantly reduce the load on the database.

Install wsl on windows to add ubuntu:
https://learn.microsoft.com/en-us/windows/wsl/install

Windows terminal:
https://learn.microsoft.com/en-us/windows/terminal/install

Intellij IDE:
https://www.jetbrains.com/idea/download

Postgres Install Windows
https://www.postgresql.org/download/

Install redis on windows:
https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-windows/

Install redis on windows ubuntu commands:

“`bash
curl -fsSL https://packages.redis.io/gpg | sudo gpg –dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg

echo “deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main” | sudo tee /etc/apt/sources.list.d/redis.list

sudo apt-get update
sudo apt-get install redis
“`

start redis server
“`bash
sudo service redis-server start
“`

test redis server is running
“`bash
redis-cli
ping
“`

get all redis keys
“`bash
redis-cli
KEYS *
“`

flush all keys
“bash
redis-cli
FLUSHALL
“`

Source Code:
https://github.com/shahidfoy/Redis-Cache-Demo

source

by Shahid Foy

linux foundation

One thought on “Cache Pokemon with Spring Boot 3 and Redis

Comments are closed.