# Feature Request

**URL:** <https://www.ruby-forum.com/t/feature-request/119687>\
**Category:** Radiant CMS\
**Created:** [November 9, 2007, 7:06am UTC](https://www.ruby-forum.com/t/feature-request/119687 "2007-11-09T07:06:24Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [November 9, 2007, 7:06am UTC](https://www.ruby-forum.com/t/feature-request/119687/1 "2007-11-09T07:06:24Z")

</div>

I have 1 seemingly minor feature requests.

- There is a “Clear Cache” button on the “Pages” tab. Is it at all  
possible to duplicate that button the “Snippets” and “Layout” tabs  
also? Very often when one is experimenting with a new snippet or  
layout, there’s a need to clear cache since the changes do not propagate  
through automatically. It’s very distracting to save changes, go to the  
pages tab, clear cache and then do a reload. In fact, I have 2 admin  
windows open with one on Pages just to clear cache. I wonder if others  
would also find this useful.

Thanks,  
Mohit.

---

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [November 9, 2007, 7:39am UTC](https://www.ruby-forum.com/t/feature-request/119687/2 "2007-11-09T07:39:43Z")

</div>

> would also find this useful.  
> Editing a layout or snippet automatically clears the whole cache -  
> there’s no manual step needed.

---

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [November 9, 2007, 8:42am UTC](https://www.ruby-forum.com/t/feature-request/119687/3 "2007-11-09T08:42:51Z")

</div>

Daniel S. wrote:

> > would also find this useful.
> 
> Editing a layout or snippet automatically clears the whole cache - there’s no manual step needed.

Hi Daniel,

I did not know that!! Thanks!

However, I do seem to notice that when I change a snippet (radiant rev  
575), it does not seem to expire the cache. I get the same page when I  
do a refresh - I even got the same page when I clicked on ‘expire page  
cache’ in that case. In fact, I had to change the page that I was  
looking at and save it. Then, the cache was expired.

I wonder if someone else is noticing the same?

Cheers,  
Mohit.  
11/9/2007 | 3:41 PM.

---

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [November 9, 2007, 1:09pm UTC](https://www.ruby-forum.com/t/feature-request/119687/4 "2007-11-09T13:09:50Z")

</div>

> I usually have two domains for my radiants site, the [foo.com](http://foo.com) and  
> [dev.foo.com](http://dev.foo.com), in the case the domain starts with “dev.” no caching  
> is ever  
> done.

That sounds like a good solution. Is there a tutorial somewhere on  
how to do this?

Do both sites ([site.com](http://site.com) and [dev.site.com](http://dev.site.com)) run off the same database,  
or do you run site\_development on [dev.site.com](http://dev.site.com) and site\_production on  
[site.com](http://site.com)?

Thanks,

A

---

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [November 9, 2007, 11:14am UTC](https://www.ruby-forum.com/t/feature-request/119687/5 "2007-11-09T11:14:26Z")

</div>

±Le 09/11/07 15:41 +0800, Mohit S. a dit :  
| However, I do seem to notice that when I change a snippet (radiant rev  
| 575), it does not seem to expire the cache. I get the same page when I  
| do a refresh - I even got the same page when I clicked on ‘expire page  
| cache’ in that case. In fact, I had to change the page that I was  
| looking at and save it. Then, the cache was expired.

Well, the cache is expired, but your browser got a expires header the  
last  
time it asked for the page. (Which is 5 minutes in the future by  
default.)  
If that time has not come, and you don’t force the reload in your  
browser,  
it won’t.

I usually have two domains for my radiants site, the [foo.com](http://foo.com) and  
[dev.foo.com](http://dev.foo.com), in the case the domain starts with “dev.” no caching is  
ever  
done.

Regards,

---

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [November 9, 2007, 1:15pm UTC](https://www.ruby-forum.com/t/feature-request/119687/6 "2007-11-09T13:15:42Z")

</div>

±le 09.11.2007 12:08:47 +0000, Andrew N. a dit :  
|  
|\> I usually have two domains for my radiants site, the [foo.com](http://foo.com) and  
|\> [dev.foo.com](http://dev.foo.com), in the case the domain starts with “dev.” no caching  
|\> is ever  
|\> done.  
|  
| That sounds like a good solution. Is there a tutorial somewhere on  
| how to do this?  
|  
| Do both sites ([site.com](http://site.com) and [dev.site.com](http://dev.site.com)) run off the same database,  
| or do you run site\_development on [dev.site.com](http://dev.site.com) and site\_production on  
| [site.com](http://site.com)?

They both go to the same mongrel cluster, they’re just two different  
apache  
virtualhost so that my going to dev.\* don’t bloat the log files.

The development site with de development database is just a single  
mongrel  
running on another port.

---

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [November 10, 2007, 7:08am UTC](https://www.ruby-forum.com/t/feature-request/119687/7 "2007-11-10T07:08:53Z")

</div>

Mathieu A. wrote:

> it won’t.
> 
> I usually have two domains for my radiants site, the [foo.com](http://foo.com) and  
> [dev.foo.com](http://dev.foo.com), in the case the domain starts with “dev.” no caching is ever  
> done.
> 
> Regards,

Hi! Thanks for the explanation - it does make sense. Unfortunately,  
the [dev.example.com](http://dev.example.com) won’t work for me cos Radiant is currently hosted on  
a sub-domain for me.

For example, Radiant runs the site on [radiant.example.com](http://radiant.example.com)  
I wonder if I created [dev.example.com](http://dev.example.com) and pointed the dev to the public  
of the radiant directory, if it would work… That way, when Radiant  
looks at it, it sees dev as the subdomain.

I guess I should try it when I get the time - thanks for the help guys!

Cheers,  
Mohit.  
11/10/2007 | 2:00 PM.

---

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [November 10, 2007, 10:38am UTC](https://www.ruby-forum.com/t/feature-request/119687/8 "2007-11-10T10:38:04Z")

</div>

±Le 10/11/07 16:31 +0900, Mark G. a dit :  
| Mohit S. wrote:  
|\> Hi! Thanks for the explanation - it does make sense. Unfortunately,  
|\> the [dev.example.com](http://dev.example.com) won’t work for me cos Radiant is currently hosted on  
|\> a sub-domain for me.  
|\>  
|  
| I thought it was possible to specify the host name for the development  
| site in the Radiant config. Can anyone confirm?

Absolutely, the dev.host config directive is for.

---

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [November 10, 2007, 8:31am UTC](https://www.ruby-forum.com/t/feature-request/119687/9 "2007-11-10T08:31:51Z")

</div>

Mohit S. wrote:

> Hi! Thanks for the explanation - it does make sense. Unfortunately,  
> the [dev.example.com](http://dev.example.com) won’t work for me cos Radiant is currently hosted on  
> a sub-domain for me.

I thought it was possible to specify the host name for the development  
site in the Radiant config. Can anyone confirm?

Cheers,  
Mark

---

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [November 10, 2007, 7:03pm UTC](https://www.ruby-forum.com/t/feature-request/119687/10 "2007-11-10T19:03:43Z")

</div>

Mathieu A. wrote:

> Absolutely, the dev.host config directive is for.

Hi Everyone,

Sorry to be a bother, but I’ve just spent 20 minutes looking through the  
files in  
{RADIANT\_APP}/config trying to find the setting. I think I’m missing  
something.

If someone is using it, could you please let me know which file it goes  
into and what it looks like there.

Sorry again & thanks,  
Mohit.

---

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [November 10, 2007, 8:21pm UTC](https://www.ruby-forum.com/t/feature-request/119687/11 "2007-11-10T20:21:09Z")

</div>

Mohit,

Add these lines to the bottom of your config/environment.rb:

require ‘radiant/config’  
Radiant::Config[‘dev.host’] = “[somehostname.com](http://somehostname.com)”

Sean

---

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [November 10, 2007, 4:13pm UTC](https://www.ruby-forum.com/t/feature-request/119687/12 "2007-11-10T16:13:52Z")

</div>

Mathieu A. wrote:

> Absolutely, the dev.host config directive is for.

Fantastic! Thanks guys,

Mohit.

---

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [November 10, 2007, 8:25pm UTC](https://www.ruby-forum.com/t/feature-request/119687/13 "2007-11-10T20:25:50Z")

</div>

Sean C. wrote:

> Mohit,
> 
> Add these lines to the bottom of your config/environment.rb:
> 
> require ‘radiant/config’  
> Radiant::Config[‘dev.host’] = “[somehostname.com](http://somehostname.com)”
> 
> Sean

Thanks a lot, Sean!

Cheers,  
Mohit.  
11/11/2007 | 3:24 AM.
