4

GWT will generated a gwt-unitCache directory with some cache files. After couple of days of working, the directory might produce over 1GB cache files. I am afraid to generate these files might damage my SSD harddisk.

I have created a 2GB ramdisk for storing temp files. My question is if it is possible to relocate the gwt-unitCache directory?

stanleyxu2005
  • 8,081
  • 14
  • 59
  • 94

2 Answers2

2

Add '<sysproperty key="gwt.persistentunitcachedir" value="cache_dir"/>' to the gwtc task in build.xml

I tried to use ${env.TEMP} instead of pointing to a physical path, but saw some random IO issues of java.

--OR--

Add '<sysproperty key="gwt.persistentunitcache" value="false"/>' to the gwtc task in build.xml

Disable create any cache files, which this is a little bit slower.

stanleyxu2005
  • 8,081
  • 14
  • 59
  • 94
0

If you use a maven project you can change the location like this:

<plugin>
 <groupId>org.codehaus.mojo</groupId>
 <artifactId>gwt-maven-plugin</artifactId>

 <configuration>
   <persistentunitcachedir>yourlocation</persistentunitcachedir>
 </configuration>
</plugin>
Lonzak
  • 9,334
  • 5
  • 57
  • 88