Reputation: 23770
The technique of caching instance variables has a specific "academic" name but I can't remember it. Please help me out.
def current_user
@current_user ||= User.find(session[:user_id])
end
Marshaling is called Marshalling.
Lazy loading is called lazy loading.
The described technique is called ... ?
Upvotes: 1
Views: 318
Reputation: 22849
The definition of memoization is defined at wikipedia to avoid repeating "calculations"
Upvotes: 1