Revert "Removed caching for component instances"

This reverts commit ca10e05d218abf1e6534766b7fe9e2e92fa42177.