Commit 576606a6 authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

Advanced deprecations in core.cache.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15977 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 24b7d901
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ if not settings.CACHES:
        import warnings
        warnings.warn(
            "settings.CACHE_* is deprecated; use settings.CACHES instead.",
            PendingDeprecationWarning
            DeprecationWarning
        )
    else:
        # The default cache setting is put here so that we
+9 −15
Original line number Diff line number Diff line
@@ -126,18 +126,12 @@ class BaseMemcachedCache(BaseCache):
    def clear(self):
        self._cache.flush_all()

# For backwards compatibility -- the default cache class tries a
# cascading lookup of cmemcache, then memcache.
class CacheClass(BaseMemcachedCache):
    def __init__(self, server, params):
        try:
            import cmemcache as memcache
            import warnings
        warnings.warn(
                "Support for the 'cmemcache' library has been deprecated. Please use python-memcached or pyblimc instead.",
                DeprecationWarning
            "memcached.CacheClass has been split into memcached.MemcachedCache and memcached.PyLibMCCache. Please update your cache backend setting.",
            PendingDeprecationWarning
        )
        except ImportError:
        try:
            import memcache
        except:
+6 −0
Original line number Diff line number Diff line
@@ -186,6 +186,12 @@ their deprecation, as per the :ref:`Django deprecation policy
          synonym for ``django.views.decorators.csrf.csrf_exempt``, which should
          be used to replace it.

        * The :class:`~django.core.cache.backends.memcached.CacheClass` backend
          was split into two in Django 1.3 in order to introduce support for
          PyLibMC. The historical :class:`~django.core.cache.backends.memcached.CacheClass`
          is now an alias for :class:`~django.core.cache.backends.memcached.MemcachedCache`.
          In Django 1.6, the historical alias will be removed.

    * 2.0
        * ``django.views.defaults.shortcut()``. This function has been moved
          to ``django.contrib.contenttypes.views.shortcut()`` as part of the