Forum: Radiant CMS Issue with caching and radius tagging

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Sylvestre Mergulhão (Guest)
on 2007-04-04 07:00
(Received via mailing list)
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">
<div class="first entry">
  <h3><r:link /></h3>
    <r:children:first by="updated_at" order="desc">
      <r:link><r:date format="%d/%m/%Y" /> - <r:title /></r:link>
    </r:children:first>
</div>
</r:children:each>
</r:find>

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
Sean C. (Guest)
on 2007-04-04 08:06
(Received via mailing list)
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
Oliver B. (Guest)
on 2007-04-04 09:26
(Received via mailing list)
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
Sean C. (Guest)
on 2007-04-04 19:25
(Received via mailing list)
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
This topic is locked and can not be replied to.