Make CacheID global

This commit is contained in:
2022-10-11 14:42:24 +02:00
parent 14df7e8a70
commit 547d50a6bc
15 changed files with 36 additions and 35 deletions

View File

@@ -36,9 +36,6 @@ type WebController struct {
// page-specific variables
captchaSiteKey string
// The cache ID is used to invalidate caches when the webserver is restarted
cacheID int64
httpClient *http.Client
// API client to use for all requests. If the user is authenticated you
@@ -69,7 +66,6 @@ func New(
websiteAddress: websiteAddress,
sessionCookieDomain: sessionCookieDomain,
proxyAPIRequests: proxyAPIRequests,
cacheID: time.Now().Unix() / 3600,
httpClient: &http.Client{Timeout: time.Minute * 10},
api: pixelapi.New(apiURLInternal),
}