<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -64,8 +64,14 @@ module Merb::Cache::ControllerInstanceMethods
   # ==== Parameter
   # options&lt;String,Hash&gt;:: The options that will be passed to #expire_key_for
   #
-  # ==== Examples
+  # ==== Examples (See Merb::Cache#expire_key_for for more options)
+  #   # will expire path/to/page/cache/news/show/1.html
+  #   expire_page(:key =&gt; url(:news,News.find(1)))
+  #
+  #   # will expire path/to/page/cache/news/show.html
   #   expire_page(:action =&gt; 'show', :controller =&gt; 'news')
+  #
+  #   # will expire path/to/page/cache/news/show*
   #   expire_page(:action =&gt; 'show', :match =&gt; true)
   def expire_page(options)
     config_dir = Merb::Controller._cache.config[:cache_html_directory]
@@ -75,6 +81,7 @@ module Merb::Cache::ControllerInstanceMethods
       else
         files = config_dir / &quot;#{key}.html&quot;
       end
+      Merb.logger.info(&quot;cache: expiring pages matching #{files}&quot;)
       FileUtils.rm_rf(files)
     end
     true
@@ -109,6 +116,12 @@ module Merb::Cache::ControllerInstanceMethods
     path = &quot;index&quot; if path.empty?
     cache_file = Merb::Controller._cache.config[:cache_html_directory] / &quot;#{path}.html&quot;
     if data
+      # If caching is disabled, don't save the cached page, but do return
+      # the page if previously cached.
+      if Merb::Controller._cache.config[:disable_page_caching]
+        Merb.logger.info(&quot;cache: deactivated (#{path})&quot;)
+        return true
+      end
       cache_directory = File.dirname(cache_file)
       FileUtils.mkdir_p(cache_directory)
       _expire_in = pages[action][0]</diff>
      <filename>merb-cache/lib/merb-cache/cache-page.rb</filename>
    </modified>
    <modified>
      <diff>@@ -41,6 +41,7 @@ class Merb::Cache
     @config = DEFAULT_CONFIG.merge(Merb::Plugins.config[:merb_cache] || {})
     if @config[:disable] == true || Merb.environment == @config[:disable]
       config[:store] = &quot;dummy&quot;
+      config[:disable_page_caching] = true
     end
     @config[:cache_html_directory] ||= Merb.dir_for(:public) / &quot;cache&quot;
     require &quot;merb-cache/cache-store/#{@config[:store]}&quot;</diff>
      <filename>merb-cache/lib/merb-cache/merb-cache.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>cd8d13709833abf4e68b2ca855a9f2d616263f74</id>
    </parent>
  </parents>
  <author>
    <name>Aaron Wheeler</name>
    <email>aaronwheeler@aaron-wheelers-macbook-pro-15.local</email>
  </author>
  <url>http://github.com/fightinjoe/merb-more/commit/feaed59155bc9d762176914802284a46a0cf50db</url>
  <id>feaed59155bc9d762176914802284a46a0cf50db</id>
  <committed-date>2008-03-21T17:36:13-07:00</committed-date>
  <authored-date>2008-03-21T17:36:13-07:00</authored-date>
  <message>Minor documentation examples added.
Added flag to turn off page caching when caching is disabled.
NOTE: disabled caching won't cache new page_cache requests, but
will serve stale ones.
NOTE: there are no tests for this, primarily because most of the
specs fail when run against a dummy store.</message>
  <tree>36dae16853ab23c4b4dde8ddbc006fcc0af768b6</tree>
  <committer>
    <name>Aaron Wheeler</name>
    <email>aaronwheeler@aaron-wheelers-macbook-pro-15.local</email>
  </committer>
</commit>
