feat: support controller's cache

This commit is contained in:
Ilia Denisov
2026-01-13 22:16:23 +02:00
parent 45c725a3ee
commit 004529cdd3
10 changed files with 543 additions and 126 deletions
+2
View File
@@ -33,6 +33,7 @@ type Repo interface {
type Controller struct {
param Param
Repo Repo
Cache *Cache
}
type Param struct {
@@ -74,6 +75,7 @@ func (c *Controller) ExecuteGame(consumer func(Repo, *game.Game)) error {
if err != nil {
return err
}
c.Cache = NewCache(g)
consumer(c.Repo, g)
return c.Repo.Release()
}