after code review changes: added more caching in cases when the hook is fired a lot
Merge branch 'bugid-97127' into dev