mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
Clear the view cache completely
- directly clear the cache rather than relying on disabling it to clear it.
This commit is contained in:
parent
79f75865a1
commit
30a2cfe6e2
@ -177,7 +177,9 @@ function activateTheme() {
|
||||
var stackLocation = _.indexOf(server.stack, _.find(server.stack, function (stackItem, key) {
|
||||
return stackItem.route === '' && stackItem.handle.name === 'settingEnabled';
|
||||
}));
|
||||
server.disable('view cache');
|
||||
|
||||
// clear the view cache
|
||||
server.cache = {};
|
||||
server.disable(server.get('activeTheme'));
|
||||
server.set('activeTheme', ghost.settings('activeTheme'));
|
||||
server.enable(server.get('activeTheme'));
|
||||
@ -211,10 +213,6 @@ function manageAdminAndTheme(req, res, next) {
|
||||
} else {
|
||||
activateTheme();
|
||||
}
|
||||
} else {
|
||||
if (server.env === 'production' && server.disabled('view cache')) {
|
||||
server.enable('view cache');
|
||||
}
|
||||
}
|
||||
|
||||
next();
|
||||
|
Loading…
Reference in New Issue
Block a user