mirror of
https://github.com/zulip/zulip.git
synced 2025-11-19 05:58:25 +00:00
tornado: Cache messages internally in tornado process.
This allows us to handle the return_messages_immediately part of get_updates requests without having to talk to the database. (imported from commit ed0b7742d359efb21a0a4960f4fc25f4337e9ad4)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from functools import wraps
|
||||
|
||||
import django.core.cache
|
||||
from django.core.cache import cache as djcache
|
||||
|
||||
def cache_with_key(keyfunc):
|
||||
"""Decorator which applies Django caching to a function.
|
||||
@@ -11,8 +11,6 @@ def cache_with_key(keyfunc):
|
||||
other uses of caching."""
|
||||
|
||||
def decorator(func):
|
||||
djcache = django.core.cache.cache
|
||||
|
||||
@wraps(func)
|
||||
def func_with_caching(*args, **kwargs):
|
||||
key = keyfunc(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user