mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 14:35:27 +00:00
Set timeouts for our memcached caches.
The policy this implements is: * 1 week for most persistent data (Clients, etc.) * 1 day for messages (imported from commit d57bb2c6b9626ffa2155c6d0ef9b60827d1f2381)
This commit is contained in:
@@ -15,7 +15,7 @@ MESSAGE_CACHE_SIZE = 25000
|
||||
def cache_save_message(message):
|
||||
djcache.set(message_cache_key(message.id), (message,), timeout=3600*24)
|
||||
|
||||
@cache_with_key(message_cache_key)
|
||||
@cache_with_key(message_cache_key, timeout=3600*24)
|
||||
def cache_get_message(message_id):
|
||||
return Message.objects.select_related().get(id=message_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user