mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
Since we flush memcached when we do a server restart, the flurry of get_updates requests that fly in afterwards are all cache misses for getting the User/UserProfile objects, so Tornado ends up spending around 70ms per get_updates request rather than the usual 1-2ms. So this should substantially improve our Tornado performance around server restarts. (imported from commit 07b8126bdfd4ff14e4c3362f9eda1fe5fd571c5b)
11 lines
343 B
Python
11 lines
343 B
Python
from optparse import make_option
|
|
from django.core.management.base import BaseCommand
|
|
from zephyr.lib.cache_helpers import fill_memcached_caches
|
|
|
|
class Command(BaseCommand):
|
|
option_list = BaseCommand.option_list
|
|
help = "Populate the memcached cache of messages."
|
|
|
|
def handle(self, *args, **options):
|
|
fill_memcached_caches()
|