ruby - What is the name for instance variable caching? -


the technique of caching instance variables has specific "academic" name can't remember it. please me out.

def current_user   @current_user ||= user.find(session[:user_id]) end 

marshaling called marshalling.
lazy loading called lazy loading.
described technique called ... ?

memoization. http://en.wikipedia.org/wiki/memoization


Comments

Popular posts from this blog

razor - Is this a bug in WebMatrix PageData? -

c# - How to set Z index when using WPF DrawingContext? -

python - How to set the color of a single cell in a pygtk treeview? -