feat: local cache

This commit is contained in:
withchao
2024-01-16 10:20:57 +08:00
parent 6e1f96a720
commit d26a1b2090
4 changed files with 29 additions and 22 deletions
+3 -1
View File
@@ -19,7 +19,9 @@ func NewConversationLocalCache(client rpcclient.ConversationRpcClient, cli redis
localcache.WithLocalSlotSize(lc.SlotSize),
),
}
go subscriberRedisDeleteCache(context.Background(), cli, lc.Topic, x.local.DelLocal)
if lc.Enable() {
go subscriberRedisDeleteCache(context.Background(), cli, lc.Topic, x.local.DelLocal)
}
return x
}