Access Cache for external Resources


IntelliJ has the ability to download XML schema for imported namespaces when I select "Fetch external resource". These files are downloaded into a cache folder. Can I somehow access this cache or even trigger the fetch from my plugin?

So far I found:

DeprecatedVirtualFileSystem fileSystem = (DeprecatedVirtualFileSystem) VirtualFileManager.getInstance().getFileSystem("http");
VirtualFile virtualFile = fileSystem.findFileByPath(uri.toString());

But using something with deprecated in its name feels wrong, and also it clearly doesn't use the same cache files as the IDE.


Hi Sven,

The “Fetch external resource” action is implemented in:

You can analyze the class code and see the details. It seems that files are stored in the path returned from getExternalResourcesPath(). Please note that this is an internal implementation detail (see, and relying on it may break in the future.


Thanks! I should have thought of looking into the source code myself.

If I decide to use this method, would a break be detected by the automatic "compatibility verification"?


Hi Sven,

Currently, it shouldn’t raise an error. You can check it by running the Gradle IntelliJ Plugin’s runPluginVerifier task.


Please sign in to leave a comment.