# Caching File

**URL:** <https://www.ruby-forum.com/t/caching-file/113090>\
**Category:** Rails\
**Created:** [August 27, 2007, 2:20pm UTC](https://www.ruby-forum.com/t/caching-file/113090 "2007-08-27T14:20:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sjames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c57346/32.png) [@sjames](https://www.ruby-forum.com/u/sjames)\
**Post date:** [August 27, 2007, 2:20pm UTC](https://www.ruby-forum.com/t/caching-file/113090/1 "2007-08-27T14:20:41Z")

</div>

Hi

I am trying to cache a whole page. Should be easy enough - the page I am  
trying to cache is available here:

[www.mydomain.com/hello/world](http://www.mydomain.com/hello/world)

And so my caching command is:

cache\_page nil, :controller =\> “hello”, :action =\> “world”

But this writes my response.body into:

myapp/public/hello/world.html

Where as it would be FAR more useful if this was written into:

myapp/public/hello/world/index.html

As then the web-server would be able to find it automatically. How can I  
do this? Someone MUST have done this before?

Thanks  
Jay
