Skip to content

Commit 87989e9

Browse files
committed
trying to fix cache
1 parent cd471c3 commit 87989e9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

generators/templates/module.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func (m *Module) Get(c context.Context, r *grpcs.{{.Module}}) (*grpcs.{{.Module}
188188
}, nil
189189
}
190190

191-
m.Cache.Set(r.Id, v)
191+
m.Cache.Set(r.Id, &v)
192192
}
193193

194194
copier.Copy(&r, &v)

utils/cache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type Cache struct {
1414
}
1515

1616
func (c *Cache) Set(key string, value interface{}) {
17-
err := c.Pool.Put(key, &value, time.Duration(c.Env.CacheLifetime)*time.Second)
17+
err := c.Pool.Put(key, value, time.Duration(c.Env.CacheLifetime)*time.Second)
1818
if err != nil {
1919
fmt.Println(err)
2020
}

0 commit comments

Comments
 (0)