Enter my code of the cache fucntion for the Programming Assignment 2, Coursera