From the category archives:

Ruby on Rails

Expirations

September 30, 2008 · 0 comments

in Ruby on Rails

So I’ve been thinking lately that I should scrap this blog. I so rarely use it any more - instead using my work blog, Twitter, Facebook, Flickr and UncleTomCobleyAndAll.com. Most of the traffic is to a few old posts, whether it’s to the simply_helpful plugin whose functions are now built-in to Rails 2.x, or long-forgotten memes.

Maybe I’ll do something new with this place. In time.

For now, on the subject of expiration, I’m linking to this comment at the base of a post about Rails’ different caching methods, and their expiration techniques.

One very useful way to avoid the dog pile is to expire behind. Similar to a write behind cache, on checking a ttl and finding the content expired, still serve up the stale content for that request, but also asynchronously start rebuilding the content via a queue/background worker. If you randomize your ttl’s a bit this results in very even system load.

To me, this makes great sense, especially in the context of an application I’m working on at the moment. So I’m linking it here not so much so I can find it again, but in the hope that the concept’ll permeate into my subconscious as I’m coding.

{ 0 comments }

Eager loading objects in a Rails has_many :through association

January 4, 2007

I’m still working on the Rails application that was the source for this tutorial — which loads of developers who I really respect keep linking to, so I must have done something right there!

Anyway, I’m going to blog this bit of code in the hope that it will help me remember it.

As stated before, I […]

New Rails feature: simply_helpful

September 4, 2006

UPDATE: Thanks to everybody who’s linking to this blog post, especially the mighty DHH himself. It’s worth pointing out that simplyhelpful development is proceeding apace. Some of the bugs mentioned have been fixed; there are additional helpers that aren’t covered here; and, as a plugin that’s very, very new, simplyhelpful may well change at short […]

Rails: ActiveRecord goes :through

January 6, 2006

Sad geek that I am, I’ve fallen a little bit in love with Ruby on Rails, the application development framework that’s ideal for building database-based web applications.
While Rails is relatively new – version 1.0 was released just last month – there are exciting things just waiting round the corner. I’m in the process of taking [...]