95e484d07372cb01f83f7d5024256e947ce956ec,imagekit/conf.py,ImageKitConf,configure_cache_backend,#ImageKitConf#Any#,18

Before Change


    USE_MEMCACHED_SAFE_CACHE_KEY = True

    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 ImportError:
                    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

    def configure_default_file_storage(self, value):
        if value is None:

After Change


    USE_MEMCACHED_SAFE_CACHE_KEY = True

    def configure_cache_backend(self, value):
        if value is None:
            from django.core.cache import DEFAULT_CACHE_ALIAS
            return DEFAULT_CACHE_ALIAS

        if value not in settings.CACHES:
            raise ImproperlyConfigured("{0} is not present in settings.CACHES".format(value))

        return value

    def configure_default_file_storage(self, value):
        if value is None:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: matthewwithanm/django-imagekit
Commit Name: 95e484d07372cb01f83f7d5024256e947ce956ec
Time: 2017-02-08
Author: vkstoykov@gmail.com
File Name: imagekit/conf.py
Class Name: ImageKitConf
Method Name: configure_cache_backend


Project Name: scipy/scipy
Commit Name: 6d44a6df430c7ba975a0081a55fb0dfc742aa6ec
Time: 2014-05-15
Author: andyfaff@gmail.com
File Name: scipy/optimize/_differentialevolution.py
Class Name: DifferentialEvolutionSolver
Method Name: __init__


Project Name: elfi-dev/elfi
Commit Name: 6f4b9ca4ffa9fcf0a437fc2ff56860ad13b61077
Time: 2016-12-07
Author: jarno.lintusaari@aalto.fi
File Name: elfi/distributions.py
Class Name: RandomVariable
Method Name: _prepare_operation