Update cache.py

Comparison with None performed with equality operator. See PEP 8.