Keep a cache of types to avoid multiple definitions