mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +08:00
Fixed the settings cache
This commit is contained in:
+3
-5
@@ -142,11 +142,9 @@ SettingService.update = (settings) => Setting.findOneAndUpdate(selector, {
|
||||
}).then((settings) => {
|
||||
|
||||
// Invalidate the settings cache.
|
||||
return Promise.all([
|
||||
cache.set('settings', settings, EXPIRY_TIME),
|
||||
cache.invalidate('publicSettings')
|
||||
])
|
||||
.then(() => settings);
|
||||
return cache
|
||||
.set('settings', settings, EXPIRY_TIME)
|
||||
.then(() => settings);
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user