danielblagy/budget-app

set up 2 instances of redis: one for caching frequently requested data, one for persistent storage

Closed this issue · 1 comments

Why:

  • we should cache frequently requested data (queried from postgres db)

  • we need a persistent storage for blacklisting jwt tokens for security

  • set up 2 redis instances in docker-compose, configure one instance to be an LRU cache, another for persistent storage with saving to disk

  • refactor internal/service/cache

  • create a persistent store service

FOR QA:

  1. Set up 2 redis instances, one for caching, one for persistent storage.
  2. If user is not logged in, 401 Unauthorized is returned instead of 400 BadRequest.