Support the caches logic introduced in Django 1.7.