performance: Cache display_recipients.

(imported from commit 9ca18bd75213423cbf17c6262113822d3009c320)
This commit is contained in:
Tim Abbott 2012-10-15 11:38:54 -04:00
parent 4062550ef7
commit a92be363d7
1 changed files with 1 additions and 0 deletions

View File

@ -16,6 +16,7 @@ md_engine = markdown.Markdown(
safe_mode = 'escape',
output_format = 'xhtml' )
@cache_with_key(lambda self: 'display_recipient_dict:%d' % (self.id))
def get_display_recipient(recipient):
"""
recipient: an subject of Recipient.