Optimize admin performance / caching

This commit is contained in:
Matias Griese
2014-10-07 12:12:21 +03:00
parent 41821c57ab
commit 33a7df85e3
5 changed files with 21 additions and 13 deletions

View File

@@ -305,6 +305,13 @@ class AdminController
$this->admin->setMessage('Successfully saved');
}
if ($this->view != 'pages') {
// Force configuration reload.
/** @var Config $config */
$config = $this->grav['config'];
$config->reload();
}
// Redirect to new location.
if ($obj instanceof Page\Page && $obj->route() != $this->admin->route()) {
$this->setRedirect($this->view . '/' . $obj->route());