From a92be363d78ebc503bbffc1b2fde067f3586341c Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 15 Oct 2012 11:38:54 -0400 Subject: [PATCH] performance: Cache display_recipients. (imported from commit 9ca18bd75213423cbf17c6262113822d3009c320) --- zephyr/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/zephyr/models.py b/zephyr/models.py index 7da5834c3f..36cd39533a 100644 --- a/zephyr/models.py +++ b/zephyr/models.py @@ -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.