Disabling/clearing IDE file cache [message #869508] |
Thu, 03 May 2012 13:58 |
David Vergnaud Messages: 2 Registered: May 2012 |
Junior Member |
|
|
Hi,
here's a newcomer question for which I have so far been unable to find an answer: is it possible to disable altogether the file caching in Eclipse, or force that it be automatically rebuilt upon e.g. compiling?
I have the following problem on Eclipse Indigo SR1: I have imported several Maven projects that contain many files in a multi-tiered directory structure. Some of these files are resource text files.
Now obviously these files are being cached by Eclipse, and need to be refreshed whenever a change is made outside of Eclipse. Failure to refresh them effectively leads to Eclipse running a program on the outdated content, which may lead to lots of frustration and hours of debugging. What's worse is that, apparently, refreshing the projects on the top-level (i.e. selecting "Refresh" from the contextual menu of the combined projects in the project view) doesn't go all the way into the directory structure, i.e. newly created files are not known and modified files are not updated. One needs to go to the one directory that contains files that have undergone changes and refresh it specifically, and just to be sure each file should be opened and checked lest the dreaded "File out-of-sync" message may still appear.
That is very annoying, therefore my question: can this cache be disabled altogether? I don't really care about performance in that case and don't mind if files have to be fetched from the hard drive each time they are being used in a Java program, what I want is Eclipse using the up-to-date content of my resource files rather than trying to be smart/thrifty.
Thanks for the help!
David
|
|
|
|
Re: Disabling/clearing IDE file cache [message #869563 is a reply to message #869527] |
Thu, 03 May 2012 15:43 |
David Vergnaud Messages: 2 Registered: May 2012 |
Junior Member |
|
|
Thanks a lot for the reply.
I must admit that some parts of your email are somewhat obscure to me as I am not yet very proficient with the whole Maven process. However, here are a few comments from my part that may help find out where the problem actually comes from:
- I'm only talking about modifications that happen completely outside of Eclipse, not files copied/modified by Maven. This includes files copied/created within the Windows Explorer, files modified in an external text editor, etc.
- Not only the presence of these files, but also their content is being cached and needs refreshing. For instance, if I add a line to a text file in an external editor then this line will still not be read when I run my Java program, until that file is explicitly refreshed in Eclipse (or at least the resource directory that contains it, i.e. simply refreshing the project isn't enough).
I haven't tried actually building the Maven project and checking the contents of the resulting jar file to see whether the resources are up-to-date or not.
It might be worth noting also that these projects are managed by Git. I seldom use the Git GUI within Eclipse though, I rather use the CLI and refresh in Eclipse after switching branches etc. I haven't had any problem with the refreshing within that process, yet it doesn't have much impact on the text resources.
I will try to build an environment where this problem may be reproduced, don't know when I'll have time for that though.
D
|
|
|
|
Powered by
FUDForum. Page generated in 0.03657 seconds