When you have a high traffic app that is going to be repeatedly making the same requests that won't change a lot from the database, It's obviously a good idea to store these results in memory instead of hitting the database every time you need the data.
Rails provides some nice built in caching mechanisms mechanisms, especially since 2.1, but to make it even easier I wrote a tiny little plugin awhile ago, and extracted it to a plugin today. It's small, somewhere around 60 lines, half of which are comments, and it's pretty simple to use.
Basically it works the same as ActiveRecord#find and friends, except you add cached_ in front of it:
User.cached_find( 1 ) User.cached_find_all_by_foo( 'bar', :include => :baz, :limit => 2 )
That's pretty much it. You can use any arguments you would to regular finders (and all the dynamic finders work; find_by_foo_and_bar, etc.), and it will return the object(s) from your configured cache store instead of hitting the database. If there is nothing in the cache it will hit the database, store it in the cache for next time, and then return it.
Expiring items from the cache is just as easy, just call expire_cache with the finder method and arguments you used to generate the cache.. so to clear the two from the above example:
User.expire_cache( 1 ) User.expire_cache( :find_by_foo, 'bar', :include => :baz, :limit => 2 )
This will automatically deal with unmarshalling objects from memory in development mode, where rails has unloaded the classes for you after each request.
If this is too simple for your needs, checkout cache-money and cache_fu. but if all you need is simple finder caching, you can grab the code for cached-find on github, or install the plugin:
./script/plugin install git://github.com/jerrett/cached-find.git
Any bugs, enhancements, etc - submit a pull request on github :)