diff options
| author | 2014-03-22 13:20:49 +0100 | |
|---|---|---|
| committer | 2014-03-22 13:20:49 +0100 | |
| commit | 72ae58d45534b4c8b49ea0ac33a9a9ec9df4bdb1 (patch) | |
| tree | 2d3bd9ddee6f6d2237fde741e30b3bdc23db6d2b /lib/Minz/Dispatcher.php | |
| parent | 5bf511c00f49eb9fd066fb903489e43529dd8338 (diff) | |
Minz: remove Minz_Cache
https://github.com/marienfressinaud/FreshRSS/issues/163#issuecomment-37990319
https://github.com/marienfressinaud/FreshRSS/issues/303
Diffstat (limited to 'lib/Minz/Dispatcher.php')
| -rw-r--r-- | lib/Minz/Dispatcher.php | 57 |
1 files changed, 21 insertions, 36 deletions
diff --git a/lib/Minz/Dispatcher.php b/lib/Minz/Dispatcher.php index 71dfe8ac6..819f4cd5c 100644 --- a/lib/Minz/Dispatcher.php +++ b/lib/Minz/Dispatcher.php @@ -41,7 +41,6 @@ class Minz_Dispatcher { * @exception Minz_Exception */ public function run ($ob = true) { - $cache = new Minz_Cache(); // Le ob_start est dupliqué : sans ça il y a un bug sous Firefox // ici on l'appelle avec 'ob_gzhandler', après sans. // Vraisemblablement la compression fonctionne mais c'est sale @@ -50,45 +49,31 @@ class Minz_Dispatcher { ob_start ('ob_gzhandler'); } - if (Minz_Cache::isEnabled () && !$cache->expired ()) { - if ($ob) { - ob_start (); - } - $cache->render (); - if ($ob) { - $text = ob_get_clean(); - } - } else { - $text = ''; //TODO: Clean this code - while (Minz_Request::$reseted) { - Minz_Request::$reseted = false; + $text = ''; //TODO: Clean this code + while (Minz_Request::$reseted) { + Minz_Request::$reseted = false; - try { - $this->createController ('FreshRSS_' . Minz_Request::controllerName () . '_Controller'); - $this->controller->init (); - $this->controller->firstAction (); - $this->launchAction ( - Minz_Request::actionName () - . 'Action' - ); - $this->controller->lastAction (); + try { + $this->createController ('FreshRSS_' . Minz_Request::controllerName () . '_Controller'); + $this->controller->init (); + $this->controller->firstAction (); + $this->launchAction ( + Minz_Request::actionName () + . 'Action' + ); + $this->controller->lastAction (); - if (!Minz_Request::$reseted) { - if ($ob) { - ob_start (); - } - $this->controller->view ()->build (); - if ($ob) { - $text = ob_get_clean(); - } + if (!Minz_Request::$reseted) { + if ($ob) { + ob_start (); + } + $this->controller->view ()->build (); + if ($ob) { + $text = ob_get_clean(); } - } catch (Minz_Exception $e) { - throw $e; } - } - - if (Minz_Cache::isEnabled ()) { - $cache->cache ($text); + } catch (Minz_Exception $e) { + throw $e; } } |
