massive cache overhaul WIP