Send client information for initial presence and process time differential

(imported from commit 99a51b7cc8b6c51c4e82757a984d07603b2980e3)
This commit is contained in:
Leo Franchi
2013-04-04 18:13:03 -04:00
parent 5d4b2305fe
commit 302cfcd48c
6 changed files with 68 additions and 47 deletions

View File

@@ -73,3 +73,10 @@ def update_user_profile_cache(sender, **kwargs):
items_for_memcached[user_profile_by_email_cache_key(user_profile.email)] = (user_profile,)
items_for_memcached[user_profile_by_id_cache_key(user_profile.id)] = (user_profile,)
djcache.set_many(items_for_memcached)
def status_dict_cache_key(user_profile):
return "status_dict:%d" % (user_profile.realm_id,)
def update_user_presence_cache(sender, **kwargs):
user_profile = kwargs['instance'].user_profile
djcache.delete(status_dict_cache_key(user_profile))