From: Sam Kong Date: 2007-01-06T01:30:41+09:00 Subject: Re: How can I do this better? Hi gaurav, gaurav bagga wrote: > hi, > > def foo i > > @cache[i]||=some_method_that_takes_long_time(i) > > end This is great. I'll use this pattern from now on. Thanks. Sam