diff options
Diffstat (limited to 'cache.go')
-rw-r--r-- | cache.go | 22 |
1 files changed, 18 insertions, 4 deletions
@@ -23,8 +23,8 @@ func init() { var err error treeReadmeCache, err = ristretto.NewCache(&ristretto.Config[[]byte, treeReadmeCacheEntry]{ NumCounters: 1e4, - MaxCost: 1 << 30, - BufferItems: 64, + MaxCost: 1 << 60, + BufferItems: 8192, }) if err != nil { clog.Fatal(1, "Error initializing indexPageCache: "+err.Error()) @@ -37,10 +37,24 @@ func init() { var err error indexCommitsDisplayCache, err = ristretto.NewCache(&ristretto.Config[[]byte, []commitDisplay]{ NumCounters: 1e4, - MaxCost: 1 << 30, - BufferItems: 64, + MaxCost: 1 << 60, + BufferItems: 8192, }) if err != nil { clog.Fatal(1, "Error initializing indexCommitsCache: "+err.Error()) } } + +var commitPathFileHTMLCache *ristretto.Cache[[]byte, template.HTML] + +func init() { + var err error + commitPathFileHTMLCache, err = ristretto.NewCache(&ristretto.Config[[]byte, template.HTML]{ + NumCounters: 1e4, + MaxCost: 1 << 60, + BufferItems: 8192, + }) + if err != nil { + clog.Fatal(1, "Error initializing commitPathFileHTMLCache: "+err.Error()) + } +} |