Convert Cache to a C++ object with a constructor
am: c4f469ad10

Change-Id: Id5b7ab2243085cde7237f91f9c5606dca0fbb309