<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -6,7 +6,12 @@
 
    # Maitenance mode: (uncoment following line)
    # RewriteRule    ^(.*)$ app/webroot/offline.html    [L]
+   
+   # HTML cache
+   RewriteCond %{REQUEST_METHOD} ^GET$
+   RewriteCond %{DOCUMENT_ROOT}/wildflower/app/webroot/cache/$1/index.html -f
+   RewriteRule ^(.*)$ app/webroot/cache/$1/index.html [L]
 
    RewriteRule    ^$ app/webroot/    [L]
    RewriteRule    (.*) app/webroot/$1 [L]
-&lt;/IfModule&gt;
\ No newline at end of file
+&lt;/IfModule&gt;</diff>
      <filename>.htaccess</filename>
    </modified>
    <modified>
      <diff>@@ -3,12 +3,3 @@
     RewriteRule    ^$    webroot/    [L]
     RewriteRule    (.*) webroot/$1    [L]
 &lt;/IfModule&gt;
- 
-&lt;IfModule mod_deflate.c&gt;
-    # compress content with type html,
-    AddOutputFilterByType DEFLATE text/html application/rss+xml
-    &lt;IfModule mod_headers.c&gt;
-        # properly handle requests coming from behind proxies
-        Header append Vary User-Agent
-    &lt;/IfModule&gt;
-&lt;/IfModule&gt;
\ No newline at end of file</diff>
      <filename>app/.htaccess</filename>
    </modified>
    <modified>
      <diff>@@ -272,6 +272,7 @@ class AppController extends Controller {
             'isPosts' =&gt; false,
             'isHome' =&gt; $this-&gt;isHome,
             'homePageId' =&gt; $this-&gt;homePageId,
+            // Here without base
             'here' =&gt; substr($this-&gt;here, strlen($this-&gt;base) - strlen($this-&gt;here)),
         );
         $this-&gt;params['Wildflower']['view'] = $params;</diff>
      <filename>app/app_controller.php</filename>
    </modified>
    <modified>
      <diff>@@ -38,7 +38,7 @@
  * In production mode, flash messages redirect after a time interval.
  * In development mode, you need to click the flash message to continue.
  */
-	Configure::write('debug', 1);
+	Configure::write('debug', 0);
 /**
  * Application wide charset encoding
  */</diff>
      <filename>app/config/core.php</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,6 @@
 &lt;IfModule mod_rewrite.c&gt;
     RewriteEngine On
-    RewriteCond %{REQUEST_METHOD} ^GET$
-    RewriteCond %{DOCUMENT_ROOT}/cache/$1/index.html -f
-    RewriteRule ^(.*)$ /cache/$1/index.html [L]
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
-&lt;/IfModule&gt;
\ No newline at end of file
+&lt;/IfModule&gt;</diff>
      <filename>app/webroot/.htaccess</filename>
    </modified>
    <modified>
      <diff>@@ -30,5 +30,7 @@ Configure::write(array('Wildflower' =&gt; array(
     'blogIndex' =&gt; 'blog',
     // Disabling the root page cache may be useful in debugging 
     // (the cache file won't be created, page routes load from the database)
-    'disableRootPageCache' =&gt; false
+    'disableRootPageCache' =&gt; false,
+    // 60000% speed increase with pure HTML caching into the webroot
+    'htmlCache' =&gt; true
 )));</diff>
      <filename>wildflower/config/core.php</filename>
    </modified>
    <modified>
      <diff>@@ -8,13 +8,20 @@ uses('Sanitize');
 class WildPagesController extends AppController {
 	
 	public $components = array('RequestHandler', 'Seo');
-	public $helpers = array('Cache', 'Form', 'Html', 'Text', 'Time', 'Wildflower.List', 'Wildflower.Tree');
+	public $helpers = array('Form', 'Html', 'Text', 'Time', 'List', 'Tree');
     public $paginate = array(
         'limit' =&gt; 25,
         'order' =&gt; array('WildPage.lft' =&gt; 'asc')
     );
     public $pageTitle = 'Pages';
     
+    function beforeFilter() {
+        parent::beforeFilter();
+        if (Configure::read('Wildflower.htmlCache') and $this-&gt;params['action'] == 'view') {
+            $this-&gt;helpers[] = 'HtmlCache';
+        }
+    }
+    
     /**
      * A static about Wildflower page
      *
@@ -301,10 +308,6 @@ class WildPagesController extends AppController {
      * Handles redirect if the correct url for page is not entered.
      */
     function view() {
-        if (Configure::read('AppSettings.cache') == 'on') {
-            $this-&gt;cacheAction = 60 * 60 * 24 * 3; // Cache for 3 days
-        }
-        
         // Parse attributes
         $args = func_get_args();
         $corrected = false;</diff>
      <filename>wildflower/controllers/wild_pages_controller.php</filename>
    </modified>
    <modified>
      <diff>@@ -7,33 +7,34 @@
  * http://www.pseudocoder.com/archives/2008/09/03/cakephp-html-cache-helper/
  *
  * @author      mattc &lt;matt@pseudocoder.com&gt;
+ * @modifiedBy klevo for Wildflower
  * @license     MIT
- *
  */
-
 class HtmlCacheHelper extends Helper {
-  function afterLayout() {
-    if (Configure::read('debug') &gt; 0) {
-      return;
-    }
+    
+    function afterLayout() {
+        if (Configure::read('debug') &gt; 0) {
+            return;
+        }
 
-    $view =&amp; ClassRegistry::getObject('view');
+        $view = ClassRegistry::getObject('view');
 
-    //handle 404s
-    if ($view-&gt;name == 'CakeError') {
-      $path = $this-&gt;params['url']['url'];
-    } else {
-      $path = $this-&gt;here;
-    }
+        //handle 404s
+        if ($view-&gt;name == 'CakeError') {
+            $path = $this-&gt;params['url']['url'];
+        } else {
+            $path = substr($this-&gt;here, strlen($this-&gt;base) - strlen($this-&gt;here));
+        }
 
-    $path = implode(DS, array_filter(explode('/', $path)));
-    if($path !== '') {
-      $path = DS . ltrim($path, DS);
-    }
-    $path = WWW_ROOT . 'cache' . $path . DS . 'index.html';
+        $path = implode(DS, array_filter(explode('/', $path)));
+        if($path !== '') {
+            $path = DS . ltrim($path, DS);
+        }
+        $path = WWW_ROOT . 'cache' . $path . DS . 'index.html';
 
-    $file = new File($path, true);
-    $file-&gt;write($view-&gt;output);
-  }
+        $file = new File($path, true);
+        $file-&gt;write($view-&gt;output);
+    }
+    
 }
-?&gt;
\ No newline at end of file
+</diff>
      <filename>wildflower/views/helpers/html_cache.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>253f60648c35f2e52dca11959492464c2441f443</id>
    </parent>
  </parents>
  <author>
    <name>klevo</name>
    <email>klevo@klevo.sk</email>
  </author>
  <url>http://github.com/klevo/wildflower/commit/53cde19b9c0dc7ede7ed78c70b12afa1795abbf3</url>
  <id>53cde19b9c0dc7ede7ed78c70b12afa1795abbf3</id>
  <committed-date>2009-04-19T03:04:34-07:00</committed-date>
  <authored-date>2009-04-19T03:04:34-07:00</authored-date>
  <message>HTML cache tested and working for page view</message>
  <tree>031481ff01ac71bd9cc522102768b23b09127d8c</tree>
  <committer>
    <name>klevo</name>
    <email>klevo@klevo.sk</email>
  </committer>
</commit>
