Moving app from singular to being created for every request (#9889)

* Moving app from singular to being created for every request.

* Automatic refactor

* Adding license header

* Feedback fixes
This commit is contained in:
Christopher Speller
2018-11-28 10:56:21 -08:00
committed by GitHub
parent 1bcf08aa4b
commit da265fbaf7
68 changed files with 1272 additions and 1096 deletions

View File

@@ -18,7 +18,7 @@ func (api *API) InitOpenGraph() {
api.BaseRoutes.OpenGraph.Handle("", api.ApiSessionRequired(getOpenGraphMetadata)).Methods("POST")
// Dump the image cache if the proxy settings have changed. (need switch URLs to the correct proxy)
api.App.AddConfigListener(func(before, after *model.Config) {
api.ConfigService.AddConfigListener(func(before, after *model.Config) {
if (before.ServiceSettings.ImageProxyType != after.ServiceSettings.ImageProxyType) ||
(before.ServiceSettings.ImageProxyURL != after.ServiceSettings.ImageProxyType) {
openGraphDataCache.Purge()