Settings: Clear session cache after changing global options #98

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2022-10-19 21:19:55 +02:00
parent 46fdfb5a6f
commit 2bca8b696b
2 changed files with 12 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ import (
"gopkg.in/yaml.v2"
"github.com/photoprism/photoprism/internal/acl"
"github.com/photoprism/photoprism/internal/entity"
"github.com/photoprism/photoprism/internal/event"
"github.com/photoprism/photoprism/internal/get"
"github.com/photoprism/photoprism/internal/i18n"
@@ -110,12 +111,17 @@ func SaveConfigOptions(router *gin.RouterGroup) {
return
}
// Propagate changes.
conf.Propagate()
// Flush session cache and update client config.
entity.FlushSessionCache()
UpdateClientConfig()
// Show info message.
event.InfoMsg(i18n.MsgSettingsSaved)
// Return updated config options.
c.JSON(http.StatusOK, conf.Options())
})
}