Basic Cache trait and CachedStore

Needs tests and many comments before we merge.