From d81446805cd4a23df711a53f2852d13b12bae9c4 Mon Sep 17 00:00:00 2001 From: Umair Khan Date: Mon, 10 Oct 2016 18:09:41 +0500 Subject: [PATCH] Django 1.10: Use `caches` object to access cache. --- zerver/lib/cache.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zerver/lib/cache.py b/zerver/lib/cache.py index a188cd05fb..f70e9c0b8b 100644 --- a/zerver/lib/cache.py +++ b/zerver/lib/cache.py @@ -4,7 +4,7 @@ from __future__ import print_function from functools import wraps from django.core.cache import cache as djcache -from django.core.cache import get_cache +from django.core.cache import caches from django.conf import settings from django.db.models import Q from django.core.cache.backends.base import BaseCache @@ -101,7 +101,7 @@ def get_cache_backend(cache_name): # type: (Optional[str]) -> BaseCache if cache_name is None: return djcache - return get_cache(cache_name) + return caches[cache_name] def cache_with_key(keyfunc, cache_name=None, timeout=None, with_statsd_key=None): # type: (Any, Optional[str], Optional[int], Optional[str]) -> Any