From fc1af9f4a12a972749f0fc82abdacb5c37ee0663 Mon Sep 17 00:00:00 2001 From: "sashakoshka@tebibyte.media" Date: Tue, 10 Sep 2024 16:44:30 -0400 Subject: [PATCH] Memo marks itself as valid on update --- container/memo.go | 1 + 1 file changed, 1 insertion(+) 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 }