add subtypes caching to the ClassScanner