refactor cache apps to app_table