Bug 41891 - Add httpUseCache option to ant core 'get' task
Summary: Add httpUseCache option to ant core 'get' task
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: unspecified
Hardware: All other
: P2 enhancement (vote)
Target Milestone: 1.8.0
Assignee: Ant Notifications List
Keywords: PatchAvailable
: 47846 (view as bug list)
Depends on:
Reported: 2007-03-19 08:05 UTC by aronvaughan
Modified: 2009-09-15 21:03 UTC (History)
1 user (show)

patch for org.apache.tools.ant.taskdefs.Get.java (1.43 KB, patch)
2007-03-19 08:06 UTC, aronvaughan
Details | Diff
documentation update for manual\CoreTasks\get.html (1.11 KB, patch)
2007-03-19 08:07 UTC, aronvaughan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description aronvaughan 2007-03-19 08:05:08 UTC
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
Comment 1 aronvaughan 2007-03-19 08:06:34 UTC
Created attachment 19738 [details]
patch for org.apache.tools.ant.taskdefs.Get.java
Comment 2 aronvaughan 2007-03-19 08:07:18 UTC
Created attachment 19739 [details]
documentation update for manual\CoreTasks\get.html
Comment 3 Steve Loughran 2007-03-20 06:17:37 UTC
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
Comment 4 aronvaughan 2007-03-20 13:40:21 UTC
sure, but is very nice for those that honor it :-)
Comment 5 Steve Loughran 2007-03-21 05:25:28 UTC
Of course, the other option would be to support the "Cache-Control" header with 


we'd then have a maxCacheAge property that you could set...
Comment 6 Stefan Bodewig 2009-08-26 03:26:49 UTC
svn revision 807953
Comment 7 Stefan Bodewig 2009-09-15 21:03:30 UTC
*** Bug 47846 has been marked as a duplicate of this bug. ***