Learning about redis...
- I have used docker to host redis
$ sudo docker run -d -p 6379:6379 redis redis_begin
- After that I have monitored redis cache
$ sudo docker exec -it redis_begin redis-cli monitor
- Finally, I followed a tutorial from medium.
- The caching system working fine :)
- My application.yml file below...
spring:
application:
name: redis-begin
cache:
type: redis
redis:
host: localhost
port: 6379
time-to-live: 60000
datasource:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://localhost:5432/inventory
username: postgres
password: *********
jpa:
hibernate:
ddl-auto: update
properties:
hibernate:
dialect: org.hibernate.dialect.PostgreSQLDialect
show-sql: true