move upstream into own package

This commit is contained in:
6543 2021-12-05 14:47:33 +01:00
parent f35c4d0f66
commit 38426c26db
No known key found for this signature in database
GPG key ID: C99B82E40B027BAE
7 changed files with 321 additions and 288 deletions

10
server/upstream/2rm.go Normal file
View file

@ -0,0 +1,10 @@
package upstream
import "github.com/OrlovEvgeny/go-mcache"
// branchTimestampCache stores branch timestamps for faster cache checking
var branchTimestampCache = mcache.New()
// fileResponseCache stores responses from the Gitea server
// TODO: make this an MRU cache with a size limit
var fileResponseCache = mcache.New()