catch errors in memcache

I've actually already deployed this to nbviewer, because a large notebook was able to bring down the entire app,
forcing a manual restart. I belive the same would happen every time the cache filled up,
and started to miss.

We can refine the PR here, though.