Factor the display_recipient cache key into a function.

(imported from commit 4a80c4db6ddcf8104f45b6b068e598378e655bc0)
This commit is contained in:
Jessica McKellar
2013-08-22 11:44:52 -04:00
parent d64c09b1ed
commit cd4daaa41f
2 changed files with 6 additions and 2 deletions

View File

@@ -221,6 +221,9 @@ def cache(func):
def message_cache_key(message_id):
return "message:%d" % (message_id,)
def display_recipient_cache_key(recipient_id):
return "display_recipient_dict:%d" % (recipient_id,)
def user_profile_by_email_cache_key(email):
# See the comment in zerver/lib/avatar.py:gravatar_hash for why we
# are proactively encoding email addresses even though they will