#NEWLINE# def __call__( self , * args ) : #NEWLINE# #INDENT# if ( not LEONARDO_MEMOIZED ) : #NEWLINE# #INDENT# return self . func ( * args ) #NEWLINE# #UNINDENT# instance = args [ 0 ] #NEWLINE# id = '{}-{}-{}' . format ( instance . _meta . app_label , instance . __class__ . __name__ , instance . id ) #NEWLINE# if self . is_actual ( id ) : #NEWLINE# #INDENT# return self . cache [ id ] [ 1 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# content = self . func ( * args ) #NEWLINE# self . cache [ id ] = ( datetime . now ( ) , content ) #NEWLINE# return content