mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Settings: Clear session cache after changing global options #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -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())
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user