Django Error - ImportError: cannot import name get_cache
Question: I was running my project using Django 1.8 and it was working properly. But
then I had to upgrade Django to 1.9 now when I again run my project it gave an
error - ImportError: cannot import name get_cache.

    
    
    python manage.py syncdb
    

and I get following:

    
    
    Traceback (most recent call last):
    File "manage.py", line 10, in <module> execute_from_command_line(sys.argv)
    File "/home/vermahim17/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 350,
      in execute_from_command_line utility.execute()
    File "/home/vermahim17/env/local/lib/python2.7/site-packages/django/core/management/__init__.py",
      line 324, in execute django.setup()
    File "/home/vermahim17/env/local/lib/python2.7/site-packages/django/__init__.py",
      line 18, in setup apps.populate(settings.INSTALLED_APPS)
    File "/home/vermahim17/env/local/lib/python2.7/site-packages/django/apps/registry.py",
      line 85, in populate app_config = AppConfig.create(entry)
    File "/home/vermahim17/env/local/lib/python2.7/site-packages/django/apps/config.py",
      line 90, in create module = import_module(entry)
    File "/usr/lib/python2.7/importlib/__init__.py",
      line 37, in import_module __import__(name)
    File "/home/vermahim17/env/local/lib/python2.7/site-packages/keyedcache/__init__.py",
      line 27, in <module>
    from django.core.cache import get_cache, InvalidCacheBackendError, DEFAULT_CACHE_ALIAS ImportError: cannot import name get_cache
    


Answer: I think , Django 1.9 doesn't have the provision to import get_cache method.
Please look into this to fix

<https://github.com/vstoykov/django-imagekit/commit/c26f8a0>

