Update model cache clearing to be compatible with Django 1.7.

 -- not thoroughly investigated, but seems to work...