<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -8,6 +8,10 @@
         # Holds all Module instantiations.
         static $instances = array();
 
+        # Boolean: $cancelled
+        # Is the module's execution cancelled?
+        public $cancelled = false;
+
         /**
          * Function: setPriority
          * Sets the priority of an action for the module this function is called from.</diff>
      <filename>includes/class/Modules.php</filename>
    </modified>
    <modified>
      <diff>@@ -100,12 +100,18 @@
                 else
                     $response = false;
 
-                if ($response !== false or $call !== false)
-                    return $this-&gt;success = true;
+                if ($response !== false or $call !== false) {
+                    $this-&gt;success = true;
+                    break;
+                }
 
                 if (++$count == count($try) and isset($this-&gt;controller-&gt;fallback) and method_exists($this-&gt;controller, &quot;display&quot;))
                     call_user_func_array(array($this-&gt;controller, &quot;display&quot;), $this-&gt;controller-&gt;fallback);
             }
+
+            $trigger-&gt;call(&quot;route_done&quot;, $this);
+
+            return true;
         }
 
         /**</diff>
      <filename>includes/class/Route.php</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,5 @@
 &lt;?php
     class Cacher extends Modules {
-        public $cancelled = false;
-
         public function __init() {
             $this-&gt;user = (logged_in()) ? Visitor::current()-&gt;login : &quot;guest&quot; ;
             $this-&gt;path = INCLUDES_DIR.&quot;/caches/&quot;.sanitize($this-&gt;user);
@@ -19,30 +17,32 @@
 
             # Remove all expired files.
             $this-&gt;remove_expired();
+
+            $config = Config::current();
+            $config-&gt;cache_exclude = (array) $config-&gt;cache_exclude;
         }
 
         static function __install() {
             $config = Config::current();
             $config-&gt;set(&quot;cache_expire&quot;, 1800);
+            $config-&gt;set(&quot;cache_exclude&quot;, array());
         }
 
         static function __uninstall() {
             $config = Config::current();
             $config-&gt;remove(&quot;cache_expire&quot;);
+            $config-&gt;remove(&quot;cache_exclude&quot;);
         }
 
         public function route_init($route) {
-            if (!($route-&gt;controller instanceof MainController) or
+            if (!empty($_POST) or
+                !($route-&gt;controller instanceof MainController) or
+                in_array($this-&gt;url, Config::current()-&gt;cache_exclude) or
                 $this-&gt;cancelled or
                 !file_exists($this-&gt;file) or
                 Flash::exists())
                 return;
 
-            $action = $route-&gt;action;
-
-            if (!empty($_POST))
-                return;
-
             if (DEBUG)
                 error_log(&quot;SERVING cache file for &quot;.$this-&gt;url.&quot;...&quot;);
 
@@ -56,6 +56,7 @@
 
         public function end($route) {
             if (!($route-&gt;controller instanceof MainController) or
+                in_array($this-&gt;url, Config::current()-&gt;cache_exclude) or
                 $this-&gt;cancelled or
                 file_exists($this-&gt;file) or
                 Flash::exists())
@@ -147,7 +148,8 @@
             if (!isset($_POST['hash']) or $_POST['hash'] != Config::current()-&gt;secure_hashkey)
                 show_403(__(&quot;Access Denied&quot;), __(&quot;Invalid security key.&quot;));
 
-            if (Config::current()-&gt;set(&quot;cache_expire&quot;, $_POST['cache_expire']))
+            $config = Config::current();
+            if ($config-&gt;set(&quot;cache_expire&quot;, $_POST['cache_expire']) and $config-&gt;set(&quot;cache_exclude&quot;, explode(&quot;, &quot;, $_POST['cache_exclude'])))
                 Flash::notice(__(&quot;Settings updated.&quot;), &quot;/admin/?action=cache_settings&quot;);
         }
 </diff>
      <filename>modules/cacher/cacher.php</filename>
    </modified>
    <modified>
      <diff>@@ -10,6 +10,10 @@
                         &lt;label for=&quot;cache_expire&quot;&gt;${ &quot;Expire Cache After&amp;hellip;&quot; | translate(&quot;cacher&quot;) }&lt;/label&gt;
                         &lt;input class=&quot;text&quot; type=&quot;text&quot; name=&quot;cache_expire&quot; value=&quot;${ site.cache_expire | escape }&quot; id=&quot;cache_expire&quot; /&gt; &lt;span class=&quot;sub&quot;&gt;${ &quot;(seconds)&quot; | translate(&quot;cacher&quot;) }&lt;/span&gt;
                     &lt;/p&gt;
+                    &lt;p&gt;
+                        &lt;label for=&quot;cache_exclude&quot;&gt;${ &quot;Exclude URLs&quot; | translate(&quot;cacher&quot;) }&lt;/label&gt;
+                        &lt;input class=&quot;text&quot; type=&quot;text&quot; name=&quot;cache_exclude&quot; value=&quot;${ site.cache_exclude | join(&quot;, &quot;) | escape }&quot; id=&quot;cache_exclude&quot; /&gt; &lt;span class=&quot;sub&quot;&gt;${ &quot;(comma separated)&quot; | translate(&quot;cacher&quot;) }&lt;/span&gt;
+                    &lt;/p&gt;
 
                     &lt;p class=&quot;buttons&quot;&gt;
                         &lt;p&gt;</diff>
      <filename>modules/cacher/pages/admin/cache_settings.twig</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>69cb90bf89a13fc7ec09e1bd28d867a29a153910</id>
    </parent>
  </parents>
  <author>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </author>
  <url>http://github.com/vito/chyrp/commit/48203516d0630d46d32b962f69edb8bae21353ef</url>
  <id>48203516d0630d46d32b962f69edb8bae21353ef</id>
  <committed-date>2008-11-06T13:37:52-08:00</committed-date>
  <authored-date>2008-11-06T13:37:52-08:00</authored-date>
  <message>* You can now set certain URLs to exclude from being cached.
* Moved the &quot;cancelled&quot; attribute to the Modules class.
* Added a &quot;route_done&quot; trigger, called after route_init tries all
  possible calls.</message>
  <tree>f3412154847398053fbcecccedd8f83bc855307d</tree>
  <committer>
    <name>Alex Suraci</name>
    <email>i.am@toogeneric.com</email>
  </committer>
</commit>
