Update cache.py

Wee fix to work with latest django