add stats endpoint

This commit is contained in:
2023-02-02 21:29:17 -08:00
parent 1ee5ff6bf0
commit dc1d43e69e
2 changed files with 22 additions and 1 deletions

View File

@@ -69,7 +69,7 @@ func CacheGraph(year int, authors, repoPaths []string, freq types.Freq) {
}
hashCache[year][a][r] = types.ExpFreq{YearFreq: freq, Created: time.Now()}
go func() {
time.Sleep(time.Minute * 15)
time.Sleep(time.Hour * 1)
mapTex.Lock()
defer mapTex.Unlock()
delete(hashCache[year][a], r)