updated cache api a little to avoid confusion
uptated entity api a bit