cache resize dimensions, add tests