Skip to content

Commit 70e753c

Browse files
committed
[cache] fix ttl set bug
1 parent a66a972 commit 70e753c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/cache/options.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ func WithTTL(ttl time.Duration) Option {
4141
return func(o *options) {
4242
if ttl <= 0 {
4343
o.validUntil = time.Time{}
44+
return
4445
}
4546

4647
o.validUntil = time.Now().Add(ttl)

0 commit comments

Comments
 (0)