From 75555ff16cf569fa5364a09926201899c9853584 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Tue, 28 Jan 2014 14:53:57 -0500 Subject: [PATCH] Rename update_realm_emoji_cache() to flush_realm_emoji(). (imported from commit fc97377113a3c2701addcc6fb0c5d1bc6f52933d) --- zerver/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zerver/models.py b/zerver/models.py index bf8927584e..e429b1d1d5 100644 --- a/zerver/models.py +++ b/zerver/models.py @@ -196,14 +196,14 @@ def get_realm_emoji_uncached(realm): d[row.name] = row.img_url return d -def update_realm_emoji_cache(sender, **kwargs): +def flush_realm_emoji(sender, **kwargs): realm = kwargs['instance'].realm cache_set(get_realm_emoji_cache_key(realm), get_realm_emoji_uncached(realm), timeout=3600*24*7) -post_save.connect(update_realm_emoji_cache, sender=RealmEmoji) -post_delete.connect(update_realm_emoji_cache, sender=RealmEmoji) +post_save.connect(flush_realm_emoji, sender=RealmEmoji) +post_delete.connect(flush_realm_emoji, sender=RealmEmoji) class RealmFilter(models.Model): realm = models.ForeignKey(Realm)