photoprism/internal/config/config_cache.go
Michael Mayer 7c0f0b41ba CI: Apply Go linter recommendations to "internal/config" packages #5330
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-11-22 20:00:53 +01:00

22 lines
491 B
Go

package config
import (
"time"
gc "github.com/patrickmn/go-cache"
)
// Cache stores shared config values for quick reuse across requests.
var Cache = gc.New(time.Hour, 15*time.Minute)
const (
// CacheKeyAppManifest is the cache key for the PWA manifest.
CacheKeyAppManifest = "app-manifest"
// CacheKeyWallpaperUri is the cache key for the current wallpaper URI.
CacheKeyWallpaperUri = "wallpaper-uri"
)
// FlushCache clears the config cache.
func FlushCache() {
Cache.Flush()
}