aboutsummaryrefslogtreecommitdiff
path: root/cache.go
diff options
context:
space:
mode:
Diffstat (limited to 'cache.go')
-rw-r--r--cache.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/cache.go b/cache.go
index 7259e38..59c4004 100644
--- a/cache.go
+++ b/cache.go
@@ -58,3 +58,17 @@ func init() {
clog.Fatal(1, "Error initializing commitPathFileHTMLCache: "+err.Error())
}
}
+
+var commitPathFileRawCache *ristretto.Cache[[]byte, string]
+
+func init() {
+ var err error
+ commitPathFileRawCache, err = ristretto.NewCache(&ristretto.Config[[]byte, string]{
+ NumCounters: 1e4,
+ MaxCost: 1 << 60,
+ BufferItems: 8192,
+ })
+ if err != nil {
+ clog.Fatal(1, "Error initializing commitPathFileRawCache: "+err.Error())
+ }
+}