diff --git a/README.md b/README.md index 5eb32ae..8801d58 100644 --- a/README.md +++ b/README.md @@ -358,3 +358,21 @@ token, so that it is removed automatically. It'd better to inject the dependency of Redis connection into the `Authn` middleware so that it's simpler to test. + +### 2024/10/15 + +Redis is integrated to keep a blacklist of logged out users. BTW `memcached` +is also interesting. In case later I want to switch to another key-value +storage, I have made an interface. It also helps for the test. I can even +just drop the redis and use a bare-hand native hashmap. + +Quite a lot benefits. And then I realised that I have done "wrong" about +`sqlc`. I shouldn't have used the pgx driver, instead the `database/sql` +driver is more universal, if I want to switch to sqlite or mysql later. + +Well it's not about changing the technical solution every 3 days, but a +system than can survive those changes elegantly must be a robust system, with +functionalities well decoupled and interfaces well defined. + +I will add some tests for existing code and then it's time to move on to +my core business logic.