在 Go 項目中使用 Redis 的幾個實用建議
今天來聊一聊 Redis,主要是聊一些在 Go 項目中使用 go-redis 代碼上的一些建議。在上代碼之前我還是要廢話幾句,在大家開發需求用到 Redis 時一定要多想個兩分鐘 “我是不是把 Redis 當數據庫用了?” 因爲數據在數據庫和 Redis 裏存兩份就就得考慮它們的一致性怎麼維護,賊麻煩,而這個一致性不做上線後還經常會出 BUG,所以不是必要我一般不用 Redis。需要過期的數據肯定 ⌘ Read more

⤋ Read More

Participate

Login to join in on this yarn.