diff --git a/container/memo.go b/container/memo.go index 2496fa7..6308f94 100644 --- a/container/memo.go +++ b/container/memo.go @@ -20,6 +20,7 @@ func NewMemo[T any] (update func () T) Memo[T] { func (this *Memo[T]) Value () T { if !this.valid { this.cache = this.update() + this.valid = true } return this.cache }