Update cache configuration

`CACHE_*` settings are deprecated in Django 1.3 and have been removed in
Django 1.5. The new way is the `CACHES` setting.