ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Scanning Resource Collections Several Times
Date Fri, 21 Aug 2009 14:15:19 GMT
On 2009-08-21, Matt Benson <> wrote:

> --- On Fri, 8/21/09, Stefan Bodewig <> wrote:

>> I'd like to modify Resources to

>>  (1) lazily initialize size() - Delete never asks for it, for
>>      example.

> Sounds good.

>>  (2) Cache the remaining iteration results when initializing size

> The only thing that concerns me about this is the fact that I did make
> 'cache' an attribute on BaseRC because I thought there might be times
> caching was not wanted.

There sure is, there are usecase where you want to see changes made
during the build reflected in resource collections used via id.

> How would one defeat caching of <resources>?

Currently you only get cached results when size() has been invoked.  In
the same case the result of size() would have been cached before (and
potentially wrong).

You are correct, it would be a better option to give explicit control
over caching (even make it false by default, since this is what we've
had in 1.7.1) and explicitly enable it in cases where Resources is used
inside of tasks (not passed around as a datatype) like in Delete.

I'll adapt to that.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message