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
Post a Comment