# Why the app does not use the cached page

**URL:** <https://www.ruby-forum.com/t/why-the-app-does-not-use-the-cached-page/142450>\
**Category:** Rails\
**Created:** [July 8, 2008, 3:35am UTC](https://www.ruby-forum.com/t/why-the-app-does-not-use-the-cached-page/142450 "2008-07-08T03:35:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sixfooter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@sixfooter](https://www.ruby-forum.com/u/sixfooter)\
**Post date:** [July 8, 2008, 3:35am UTC](https://www.ruby-forum.com/t/why-the-app-does-not-use-the-cached-page/142450/1 "2008-07-08T03:35:12Z")

</div>

I am working on a rails project based on rails 1.2.3  
I write the routes.rb like this

map.connect ‘’, :controller =\> “welcome”, :action =\> ‘index’

and I also set the caches\_page for welcome/index

The cache page works well on my macbook. when the first visit the app  
creates the index.html in the public directory and use the cached  
index.html when the next visits come.

But when I deploy the app to my hostmonster’s host the app does not use  
the cached page, it creates new index.html instead.

I don’t know what’s the differents between my computer and the host. Why  
the app does not use cached page.

By the way I also set the other caches\_page they work well both on my  
computer and the host.

Any idea?  
Thanks.

---

<div class="post-metadata">

**Author:** ![sixfooter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@sixfooter](https://www.ruby-forum.com/u/sixfooter)\
**Post date:** [July 8, 2008, 3:40am UTC](https://www.ruby-forum.com/t/why-the-app-does-not-use-the-cached-page/142450/2 "2008-07-08T03:40:24Z")

</div>

On Tue, 2008-07-08 at 03:35 +0200, Hongliang Zhang wrote:

> Thanks.

* * *

just guessing but the user that the web server runs as doesn’t have  
write permissions in ‘public’ to create the folder/file in order to  
cache it.

Craig

---

<div class="post-metadata">

**Author:** ![sixfooter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@sixfooter](https://www.ruby-forum.com/u/sixfooter)\
**Post date:** [July 8, 2008, 5:58am UTC](https://www.ruby-forum.com/t/why-the-app-does-not-use-the-cached-page/142450/3 "2008-07-08T05:58:59Z")

</div>

On Tue, 2008-07-08 at 05:29 +0200, Hongliang Zhang wrote:

> The cached page is already created but not used.  
> so I don’t think it’s the permission problem.

* * *

if it’s a ‘cached page’, you should be able to move it somewhere else  
and it would be automatically recreated.

Craig

---

<div class="post-metadata">

**Author:** ![sixfooter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@sixfooter](https://www.ruby-forum.com/u/sixfooter)\
**Post date:** [July 8, 2008, 5:29am UTC](https://www.ruby-forum.com/t/why-the-app-does-not-use-the-cached-page/142450/4 "2008-07-08T05:29:23Z")

</div>

Craig W. wrote:

> On Tue, 2008-07-08 at 03:35 +0200, Hongliang Zhang wrote:
> 
> > Thanks.
> 
> * * *
> 
> just guessing but the user that the web server runs as doesn’t have  
> write permissions in ‘public’ to create the folder/file in order to  
> cache it.
> 
> Craig

The cached page is already created but not used.  
so I don’t think it’s the permission problem.
