Add a typespec for cache_dynamic_types().