Files
zulip/zephyr/management/commands/fill_memcached_caches.py
Tim Abbott 60c3cf826d restart-server: Fill memcached caches after clearing the cache.
Our previous code could in theory end up clearing the caches it had
just filled, if Tornado's cache filling work happened to be faster
than the memcached flush.

(imported from commit 48174aadad398fb7a7c917a1df765c1261b12a55)
2013-03-14 15:07:41 -04:00

11 lines
345 B
Python

from optparse import make_option
from django.core.management.base import BaseCommand
from zephyr.lib.message_cache import populate_message_cache
class Command(BaseCommand):
option_list = BaseCommand.option_list
help = "Populate the memcached cache of messages."
def handle(self, *args, **options):
populate_message_cache()