#22829 added caching for performance