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

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

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -