Added the beginnings of a cache class.