split off logic into cache and noncached + implemented getting entity body.