Speed up linting and type-checking by using cache