Added cahcing of previously processed types.