diff options
Diffstat (limited to 'cache.go')
-rw-r--r-- | cache.go | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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()) + } +} |