Cache invalid types also
Merge pull request #3084 from wmtan/CacheInvalidTypesAlso

Cache invalid types also