Skip to content

Commit

Permalink
Merge ea0f7a9 into 9b3c271
Browse files Browse the repository at this point in the history
  • Loading branch information
derenio committed Jul 8, 2015
2 parents 9b3c271 + ea0f7a9 commit 1a203ec
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions versatileimagefield/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
from django.conf import settings
from django.core.cache import (
cache as default_cache,
get_cache,
InvalidCacheBackendError
)
# Beginning with Django 1.7 'get_cache' is deprecated in favor of 'caches'
# and will be dropped in Django 1.9
try:
from django.core.cache import caches
except ImportError:
from django.core.cache import get_cache as caches

# Defaults
QUAL = 70
Expand Down Expand Up @@ -59,7 +64,7 @@
)

try:
cache = get_cache(VERSATILEIMAGEFIELD_CACHE_NAME)
cache = caches(VERSATILEIMAGEFIELD_CACHE_NAME)
except InvalidCacheBackendError:
cache = default_cache

Expand Down

0 comments on commit 1a203ec

Please sign in to comment.