<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,7 +2,7 @@ module RenderCaching
   module ControllerAdditions
     private
     
-    def render_with_cache(key = nil)
+    def render_with_cache(key = nil, options = nil)
       key ||= request.request_uri
       body = Rails.cache.read(key)
       if body
@@ -10,7 +10,7 @@ module RenderCaching
       else
         yield if block_given?
         render unless performed?
-        Rails.cache.write(key, response.body)
+        Rails.cache.write(key, response.body, options)
       end
     end
   end</diff>
      <filename>lib/render_caching/controller_additions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -74,4 +74,9 @@ describe RenderCaching::ControllerAdditions do
     Rails.cache.write('some_key', 'page content')
     render_with_cache('some_key') { violated('block was executed') }
   end
+  
+  it &quot;should pass options to cache write call&quot; do
+    Rails.cache.expects(:write).with('some_key', @response.body, :expires_in =&gt; 5)
+    render_with_cache('some_key', :expires_in =&gt; 5)
+  end
 end</diff>
      <filename>spec/render_caching/controller_additions_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>091217207a8a3e61e433ef9654a0f8d397c01b7c</id>
    </parent>
  </parents>
  <author>
    <name>Ryan Bates</name>
    <email>ryan@railscasts.com</email>
  </author>
  <url>http://github.com/ryanb/render-caching/commit/fedadd2b69f9b1d2c6b9340c8c426ce859d890ca</url>
  <id>fedadd2b69f9b1d2c6b9340c8c426ce859d890ca</id>
  <committed-date>2008-06-19T15:27:06-07:00</committed-date>
  <authored-date>2008-06-19T15:27:06-07:00</authored-date>
  <message>render with cache options are passed on to cache.write</message>
  <tree>8db29af475ced3a2dba4e94f8e929e6d76d0688a</tree>
  <committer>
    <name>Ryan Bates</name>
    <email>ryan@railscasts.com</email>
  </committer>
</commit>
