The ifelse logic here is getting pretty intense, and the "rewrite the ndb object to memcache" behavior isn't obvious at a casual read. Do we even need the memcache cache here if theoretically that get from NDB will be memcached by NDB?

This might be cleaner if broken out into something like `_getCachedFromMemcache()`, `_getCachedFromNdb()`, then `_render()` (or even `_getLive()`?), then `_write`.