fixed cache over-complicted stuff, all done in js now