Redis rework
- [x] Implementation of GroupedCache to enable read access with multiple groups. (#944)
- [x] Rewrite current logic to use rueidis
- [ ] Redis implementation of GroupedCache (using rueidis)
- [ ] Redis implementation of ExpirationCache (DNS response caching) (using rueidis)
- [ ] Rework Prefetching (Redis & in-memory implementation)
- [ ] if Redis enabled: execution of Jobs (e.g. List refresh, periodic metrics with lists count, prefetching, ...?) only on one instance, (using Redis lock with https://github.com/rueian/rueidis/tree/main/rueidislock)
- [ ] If Redis enabled: synchronization of enabled/disabled (blocking) status via Redis.
I picked this one up again since rueidis is stable now and I hadn't worked with it in a while.
I'm stuck with the unit tests(again). 😞 Most of the tests need to be rewritten since minredis don't support some features which rueidis neets.
I can't get my head around how to solve the requirements of the test setups with rueidismock.
I'm currently considering simply spinning up a test container with redis running alongside the tests...
If we can cover all use cases with e2e tests, why not? Unit test can be helpful to test some edge cases, but if it needs much efford to mock the infrastructure, it is better to throw them away 😄
I'll open a PR draft without the tests soon. Maybe I'm only missing something and it isn't that hard.
more eyes & more thoughts may help 😅