On 24 Jan 2011, at 07:29, Carl Youngblood wrote: > On Sun, Jan 23, 2011 at 8:50 PM, William Ross <w...@spanner.org> wrote: > From a brief look it seems that the rss-reader extension disables all page > caching. It does this in a rather inadvisable way (by amending the Page class > itself rather than defining a specialist subclass) but since your site is > primarily an RSS-aggregator, fixing that wouldn't help much. > > The extension is quite old and I expect the decision dates back to the old > radiant cache: with Rack::Cache in front of the whole thing it doesn't make > sense any more. Simply commenting out these lines in lib/rss_reader.rb: > > > def cache? > > > false > > > end > > > > should make a big difference. > > William, I just thought of something. We're running Radiant 0.8.0. Would this > affect your advice at all?
No, that shouldn't make any difference. But the advice is more diagnostic than curative, if you see what I mean. There are lots of factors that could be slowing you down and that was only one. Here are some more diagnostics: 1. Make sure you don't force-reload the page. On a normal radiant installation I find that a hard refresh in firefox will always pass through the cache. It shouldn't: the cache is configured to ignore reload requests from the client, but for some reason they still work. Hitting refresh without any modifier keys will ignore the browser cache but should still allow you to test the server cache. 2. Reload the page (without forcing it) twice in quick succession and on the second attempt examine the response headers. The easy way to do that is to install Firebug and watch the 'Net' panel. If the cache is working you should get '304 Not Modified' for everything. If you get '200 OK' responses for the radiant page in that test then your site is not cached. 3. Have a quick look at the webserver configuration. If there are proxies or redirects involved, for example, it's easy to mangle cache headers. 4. Now you can be fairly sure that the problem is in a radiant extension. You will need to poke around in the console (in production mode on the live site) to find out more. Here are some values you could check: SiteController.cache_timeout (should be a duration, most likely 5.minutes) Radiant::Config['dev.host'] (make sure this isn't the same as your production host) Page.find_by_parent_id(nil).cache? (that's the home page. cached? should be true) That last will most likely return false, and you will need to track down why. best, will