# 304 Caching

**URL:** <https://www.ruby-forum.com/t/304-caching/87075>\
**Category:** Radiant CMS\
**Created:** [February 28, 2007, 12:20am UTC](https://www.ruby-forum.com/t/304-caching/87075 "2007-02-28T00:20:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dasch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@dasch](https://www.ruby-forum.com/u/dasch)\
**Post date:** [February 28, 2007, 12:20am UTC](https://www.ruby-forum.com/t/304-caching/87075/1 "2007-02-28T00:20:52Z")

</div>

I checked in a change last night  
([http://dev.radiantcms.org/radiant/changeset/348](http://dev.radiantcms.org/radiant/changeset/348)) to make cached  
responses send out a ‘Last-Modified’ header and send back a 304 if the  
‘If-Modified-Since’ header is set on the request. I wasn’t expecting it  
to really achieve much saving on pages with just 5 minute expiry, but  
I’m serving my stylesheet through radiant (as I’m guessing most of you  
are), and the extra bit of speed I’m getting on not having that  
stylesheet go over the wire is making my site seem significantly  
zippier.

One thing that I’ve had to do as part of that is that the  
ResponseCache#update\_response method now expects a third parameter - the  
request. Currently this method is not requiring the request - it’ll  
continue happily without it - but that’s only because I didn’t want to  
break anybody’s extensions without warning. Are people using the  
ResponseCache#update\_response method from their extensions? I’d like to  
make the method require the request so that there’s less confusion in  
the code.

(Oh, I’m talking about the mental branch here)

Dan.

---

<div class="post-metadata">

**Author:** ![dasch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@dasch](https://www.ruby-forum.com/u/dasch)\
**Post date:** [February 28, 2007, 12:25am UTC](https://www.ruby-forum.com/t/304-caching/87075/2 "2007-02-28T00:25:53Z")

</div>

Good stuff, Daniel. It seems like such a minuscule change, but since  
Radiant can’t use page caching, everything has to go through  
ActionPack. Any way we can make that path shorter without sacrificing  
functionality is a good thing.

Sean
