implement caching in classfinder