#NEWLINE# def add( handler , content , rendered_content ) : #NEWLINE# #INDENT# if ( not rendered_content ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# rendered_content += '<!-- cached -->' #NEWLINE# full_path = get_full_filename ( handler , handler . content_url ( content ) ) #NEWLINE# f = open ( full_path , 'wb' ) #NEWLINE# f . write ( rendered_content ) #NEWLINE# f . close ( ) #NEWLINE# #UNINDENT# except Exception as ex : #NEWLINE# #INDENT# pass