need the ability to turn caching off at the HttpUrlConnection when doing a get (we were getting stale download contents and needed to force a fetch and not use the servers' cached version) code is svn - trunk fetch as of 3/19/2007 AM - minor change, attaching patch and documentation update patch
Created attachment 19738 [details] patch for org.apache.tools.ant.taskdefs.Get.java
Created attachment 19739 [details] documentation update for manual\CoreTasks\get.html
Seems reasonable; setUseCaches has been around since forever so nothing breaks. You know its only a hint, don't you? Proxy servers have the right to ignore it. The most reliable way to <get> safely is to append a timestamp ?something=20070320121717 kind of value at the end
sure, but is very nice for those that honor it :-)
Of course, the other option would be to support the "Cache-Control" header with connection.addRequestProperty("Cache-Control",Integer.toString(maxCacheAge)); we'd then have a maxCacheAge property that you could set...
svn revision 807953
*** Bug 47846 has been marked as a duplicate of this bug. ***