type caching