Modified cachemarix.R file as asked for the assignment