Caching and optimizations

Hey guys,

I looked around and it seems like this hasn’t been asked before, but
one of my major concerns with Radiant (which I’ve been using for quite
some time now) is its caching mechanism. Here’s my problem:

I plan on deploying RadiantCMS on websites with content that doesn’t
change often - it gets updated maybe every week, but never twice in,
say, a day. This being said, the 5-minute caching mechanism becomes
useless as all but a few requests are dynamically generated and not
taken from the cache.

Now for the question: is there a plan to make the caching method used
by Radiant change, or should I patch the application myself? I can
predict many others will be in this situation soon as the application
is considered for real-world use by more and more developers and/or
companies. In critical situations for pages who get loads of requests
but little changes, we may have a problem.

Thoughts or solutions?

Fred


Frederico Oliveira
Webreakstuff - A design, development and usability consulting company
http://webreakstuff.com | [email protected]

Frederico Oliveira wrote:

Now for the question: is there a plan to make the caching method used
by Radiant change, or should I patch the application myself? I can
predict many others will be in this situation soon as the application
is considered for real-world use by more and more developers and/or
companies. In critical situations for pages who get loads of requests
but little changes, we may have a problem.

I don’t have plans to change the caching mechanism. Are you really
experiencing that much load that regenerating the page every five
minutes or so is a problem? I would find that really, really surprising.
If you were you could probably afford to buy new hardware or approach
the issue from a different angle.


John L.
http://wiseheartdesign.com

On 8/18/06, John W. Long [email protected] wrote:

I don’t have plans to change the caching mechanism. Are you really
experiencing that much load that regenerating the page every five
minutes or so is a problem? I would find that really, really surprising.
If you were you could probably afford to buy new hardware or approach
the issue from a different angle.

It ultimately depends on the site’s usage patterns. In a packed
environment (like shared hosting), it may become a big concern - if
most page requests are non-cached, CPU usage for dispatchers goes way
up when taking hits (possibly blowing up CPU-time limits).

It is a fact that most people wont run into this sort of situation,
but those I describe on the above paragraph might. Naturally most
people with critical pages will choose to run them on dedicated setups
(possibly even balanced environments), so it wont become a liability.

Still, giving users the chance to change the ResponseCache expiry
times in, say, a config file would be a safe bet. Naturally anyone can
change the ResponseCache model and do it themselves (like I have, for
pages who don’t get too many updates - since there’s a clever Clear
Page Cache button to override the expiry time), but maybe that’s one
of the things where configuration comes in handy for people who’ll be
deploying a lot of pages.

Fred

Frederico Oliveira wrote:

Still, giving users the chance to change the ResponseCache expiry
times in, say, a config file would be a safe bet.

Actually, you can do that. Just drop the following in
config/environment.rb:

ResponseCache.defaults[:expire_time] = 2.days

There are a couple of other defaults that you can use to configure
caching. They are listed at the top of this file:

http://dev.radiantcms.org/radiant/browser/trunk/radiant/app/models/response_cache.rb

But I must ask: Is this actually an issue for you or are you
anticipating that it might be? I ask because I believe that a lot of
people make assumptions about caching based on what was once required on
old hardware. I believe that modern hardware has changed the game and
CPU time is no longer an issue for all but mega Web sites.

Jason Hoffman did a study on Radiant and caching and posted some
interesting screenshots about it on Flickr:

http://flickr.com/photos/textdriveinc/179393665/in/photostream/


John L.
http://wiseheartdesign.com

On Aug 18, 2006, at 16:29, John W. Long wrote:

Jason Hoffman did a study on Radiant and caching and posted some
interesting screenshots about it on Flickr:

7 million on radiant behind a BIG-IP: throughput, connecti… | Flickr

I know Jason loves testing their Sun/Solaris platform :slight_smile:

What kind of server/cluster was that test performed on?

13 mongrels in a Pound? Where is the HTTP server for static files?

*Mars

( <> … <> )