Abstracted "cacheClassPaths" method.