def configure_cache_backend(self, value):
        if value is None:
            # DEFAULT_CACHE_ALIAS doesn't exist in Django<=1.2
            try:
                from django.core.cache import DEFAULT_CACHE_ALIAS as default_cache_alias
            except ImportError:
                default_cache_alias = 'default'

            caches = getattr(settings, 'CACHES', None)
            if caches is None:
                # Support Django<=1.2 there is no default `CACHES` setting
                try:
                    from django.core.cache.backends.dummy import DummyCache
                except __HOLE__:
                    dummy_cache = 'dummy://'
                else:
                    dummy_cache = 'django.core.cache.backends.dummy.DummyCache'
                return dummy_cache

            if default_cache_alias in caches:
                value = default_cache_alias
            else:
                raise ValueError("The default cache alias '%s' is not available in CACHES" % default_cache_alias)

        return value
dataset/ETHPy150Open matthewwithanm/django-imagekit/imagekit/conf.py/ImageKitConf.configure_cache_backend