diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2021-12-01 02:05:24 +0300 |
---|---|---|
committer | feistel <6742251-feistel@users.noreply.gitlab.com> | 2021-12-01 02:05:24 +0300 |
commit | aa91e391469b832a925ebe81cdf575b1ea59c2ad (patch) | |
tree | fc7639be2a422565c5a3437d9b31c8e1202b00cb | |
parent | 9edffc543f407a709afd3fae229360b30f6c0d63 (diff) |
docs: improve Cache documentation
-rw-r--r-- | internal/lru/lru.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/lru/lru.go b/internal/lru/lru.go index 8c467ba5..8927c97b 100644 --- a/internal/lru/lru.go +++ b/internal/lru/lru.go @@ -26,6 +26,8 @@ const defaultCacheExpirationInterval = time.Minute type Option func(*Cache) // Cache wraps a ccache and allows setting custom metrics for hits/misses. +// duration and maxSize are initialized to their default values but should +// be configured using WithExpirationInterval and WithMaxSize options. type Cache struct { op string duration time.Duration |