added factory caching for component creation