Add cachemean.R and a test for the same using testthat