Fix #2707: support Window.disableCache(bool)