Displaying 1 result from an estimated 1 matches for "acts_as_nearly_fresh".
2007 Apr 20
2
Caching of database values
If do something like this:
dbObj = MyTable.find_by_id(5)
a = dbObj.name
b = dbObj.name
How many times will an SQL call be made to get the value of
MyTable.name for id 5? In other words, are the values for dbObj
cached in the object? Is there a way of controlling that? (I can
imagine that sometimes you might not want to cache them if you wanted
to be sure of having the latest