Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime Martinez <jmartinez@gitlab.com>2021-12-01 02:05:24 +0300
committerfeistel <6742251-feistel@users.noreply.gitlab.com>2021-12-01 02:05:24 +0300
commitaa91e391469b832a925ebe81cdf575b1ea59c2ad (patch)
treefc7639be2a422565c5a3437d9b31c8e1202b00cb /internal/lru
parent9edffc543f407a709afd3fae229360b30f6c0d63 (diff)
docs: improve Cache documentation
Diffstat (limited to 'internal/lru')
-rw-r--r--internal/lru/lru.go2
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