Implement cache for already evaluated types.