cache class now completed and allows injection of an adapter so its methods can
be used.