Create CachingInverse

Need to give input as follow:

mat<-matrix(data = c(3,5,8,9,1,0,6,7,4) , nrow=3, ncol=3)
mat2<-makeCacheMatrix(mat)
cachsolve(mat2)
cachsolve(mat2) ...it would retrieved cached matrix(already saved in cache)