[Rails] Re: Storing request-scoped data in a model

2009-04-12 Thread Andrew Timberlake
On Fri, Apr 10, 2009 at 9:25 AM, Shak Shak wrote: > > Andrew Timberlake wrote: >> On Thu, Apr 9, 2009 at 5:40 PM, Shak Shak >> wrote: >>> doesn't need to (in fact, shouldn't) last past a single request. >>> >>> An instance variable in ApplicationController sounds like it would do >>> this, but I

[Rails] Re: Storing request-scoped data in a model

2009-04-10 Thread Shak Shak
Andrew Timberlake wrote: > On Thu, Apr 9, 2009 at 5:40 PM, Shak Shak > wrote: >> doesn't need to (in fact, shouldn't) last past a single request. >> >> An instance variable in ApplicationController sounds like it would do >> this, but I would say such data should be kept with the model. Of course

[Rails] Re: Storing request-scoped data in a model

2009-04-09 Thread Andrew Timberlake
On Thu, Apr 9, 2009 at 5:40 PM, Shak Shak wrote: > > Hi all, > > What is the best way to store variables strictly for the lifetime of a > Rails' request? > > I'm currently storing AR records in Rails.cache. Although this saves a > trip to the DB, I feel it's unnecessary to hit the cache more than