Created class for all cache functions