begin implementation of cache