added get/save cache functions