neko32 / service-template

akka-http-based micro service baseline
0 stars 0 forks source link

TANU-000007 Set expiry to BIN cache #8

Closed neko32 closed 3 years ago

neko32 commented 3 years ago

Overview

Currently BIN cache doesn't have expiry. We may want to expire the cache with 1 hour.

TODO

Pass expiry parameter with 1 hour = 3600 seconds on Redis set query

Success Criteria

After persisting the BIN to redis, we should see TTL redis command should return seconds to expiry.

neko32 commented 3 years ago

test evidence

C:\Users\neko6>redis-cli
127.0.0.1:6379> keys *
1) "test:score10"
2) "binsvc:bin:45717360"
3) "test:score9"
127.0.0.1:6379> ttl binsvc:bin:45717360
(integer) 3565
127.0.0.1:6379>