Extract Cache to an interface