moved caching code into Util.Text.CachingMeasurer