Update cache.py

Fixed cellids indexing bug