# Issue with caching and radius tagging

**URL:** <https://www.ruby-forum.com/t/issue-with-caching-and-radius-tagging/91053>\
**Category:** Radiant CMS\
**Created:** [April 4, 2007, 5:00am UTC](https://www.ruby-forum.com/t/issue-with-caching-and-radius-tagging/91053 "2007-04-04T05:00:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sylvestre\_MergulhSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f17d59/32.png) [@Sylvestre\_MergulhSS](https://www.ruby-forum.com/u/Sylvestre_MergulhSS)\
**Post date:** [April 4, 2007, 5:00am UTC](https://www.ruby-forum.com/t/issue-with-caching-and-radius-tagging/91053/1 "2007-04-04T05:00:36Z")

</div>

Hi everyone…

For some hours I’ve forgotten that Radiant have 5 minutes cache and I  
has thinking that the snippet i’ve made was broken! I know this is a  
newbie problem, but will be good if Radiant disable caching while in  
devel enviroment, don’t you think?

About my snippet. Here is the code:

\<r:find url="/news/"\>  
\<r:children:each by=“title” order=“asc”\>

### 
 - 

So I have a news Page, and various children thats are categories of  
news. And this snippet list each category of news and the latest news  
of that category. Its working. Do you think its ok? Or is it to much  
worst? Its my first snippet 😉

Thanks,  
Mergulhão

---

<div class="post-metadata">

**Author:** ![Sylvestre\_MergulhSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f17d59/32.png) [@Sylvestre\_MergulhSS](https://www.ruby-forum.com/u/Sylvestre_MergulhSS)\
**Post date:** [April 4, 2007, 6:06am UTC](https://www.ruby-forum.com/t/issue-with-caching-and-radius-tagging/91053/2 "2007-04-04T06:06:39Z")

</div>

It’s important to have caching enabled in development mode because the  
caching is such a core feature of the way Radiant works. If it were  
disabled, one would come upon a lot of surpises when moving to  
production mode, especially if one were developing plugins or  
extensions.

That’s a fine snippet, by the way. Good job! The cache should be  
cleared automatically after a Snippet is saved.

Sean

---

<div class="post-metadata">

**Author:** ![Sylvestre\_MergulhSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f17d59/32.png) [@Sylvestre\_MergulhSS](https://www.ruby-forum.com/u/Sylvestre_MergulhSS)\
**Post date:** [April 4, 2007, 7:26am UTC](https://www.ruby-forum.com/t/issue-with-caching-and-radius-tagging/91053/3 "2007-04-04T07:26:44Z")

</div>

Sean C. wrote:

> It’s important to have caching enabled in development mode because the  
> caching is such a core feature of the way Radiant works. If it were  
> disabled, one would come upon a lot of surpises when moving to  
> production mode, especially if one were developing plugins or extensions.

Sean, can you elaborate on this? I am curious what your experiences  
are, because I generally disable the cache especially when I am  
developing extensions. I find it rather annoying otherwise, but maybe  
I am approaching it the wrong way.

Cheers,  
Oliver

---

<div class="post-metadata">

**Author:** ![Sylvestre\_MergulhSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f17d59/32.png) [@Sylvestre\_MergulhSS](https://www.ruby-forum.com/u/Sylvestre_MergulhSS)\
**Post date:** [April 4, 2007, 5:25pm UTC](https://www.ruby-forum.com/t/issue-with-caching-and-radius-tagging/91053/4 "2007-04-04T17:25:25Z")

</div>

I meant primarily that if you have extensions or plugins that provide  
data to or modify the output of a page, you should be aware of the  
interactions that it will have with the cache. For example, back in  
August when I wrote the comments behaviors, I found that a page I wanted  
to keep cached (the Commentable) would cache a redirect to itself, which  
caused an irresolvable redirect loop. If I had run with caching off, I  
might not have noticed that. So in a sense, I consider Radiant’s  
caching to be a system feature rather than a side-effect of running in  
production.

If Radiant used only Rails’ caching mechanisms, it might be easy to  
ignore. However, even then, the cache needs to respond to the changing  
needs of the system – you can’t rule it out entirely.

I guess what I’m trying to say is write your extensions or behaviors or  
plugins with the consideration that unless you specifically set a  
page/behavior to be uncached, you will have to deal with the  
implications that come along with caching.

Sean
