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

python - Why doesn't list have safe "get" method like dictionary? -

razor - Is this a bug in WebMatrix PageData? -

sql server - Stored procedure -