Finished cache implementation.