Support the caches logic introduced in Django 1.7.

Closes #643
    except ImportError:  # Django <  1.7

will help removing the try/except when it isn't needed any more.