Almost there; Replace memCache with :memory: SQLite cache

This commit is contained in:
Philipp Heckel 2022-02-27 09:38:46 -05:00
parent 8b32cfaaff
commit 7d93b0596b
6 changed files with 89 additions and 52 deletions

View file

@ -162,11 +162,11 @@ func New(conf *Config) (*Server, error) {
func createCache(conf *Config) (cache, error) {
if conf.CacheDuration == 0 {
return newNopCache(), nil
return newNopCache()
} else if conf.CacheFile != "" {
return newSqliteCache(conf.CacheFile)
return newSqliteCache(conf.CacheFile, false)
}
return newMemCache(), nil
return newMemCache()
}
// Run executes the main server. It listens on HTTP (+ HTTPS, if configured), and starts