photoprism/internal/config/config_cache.go
Michael Mayer ff3f9b8537 Config: Improve Wallpaper URI caching and tests
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-03-20 10:28:01 +01:00

20 lines
286 B
Go

package config
import (
"time"
gc "github.com/patrickmn/go-cache"
)
var Cache = gc.New(time.Hour, 15*time.Minute)
const (
CacheKeyAppManifest = "app-manifest"
CacheKeyWallpaperUri = "wallpaper-uri"
)
// FlushCache clears the config cache.
func FlushCache() {
Cache.Flush()
}