diff --git a/docs/manual/CoreTypes/resources.html b/docs/manual/CoreTypes/resources.html index b077c3a06..a1067962a 100644 --- a/docs/manual/CoreTypes/resources.html +++ b/docs/manual/CoreTypes/resources.html @@ -324,6 +324,19 @@ platforms.
Restricts another nested resource collection using resource selectors:
++
+ +Attribute +Description +Required ++ +cache +Whether to cache results; disabling + may seriously impact performance +No, default true +Parameters specified as nested elements
A single resource collection is required.
Nested resource selectors are used to "narrow down" the included diff --git a/src/main/org/apache/tools/ant/types/resources/Restrict.java b/src/main/org/apache/tools/ant/types/resources/Restrict.java index 5eb04ae3f..2f8409811 100755 --- a/src/main/org/apache/tools/ant/types/resources/Restrict.java +++ b/src/main/org/apache/tools/ant/types/resources/Restrict.java @@ -67,6 +67,22 @@ outer: for (Iterator ri = w.getResourceCollection().iterator(); ri.hasNext( w.add(c); } + /** + * Set whether to cache collections. + * @param b boolean cache flag. + */ + public synchronized void setCache(boolean b) { + w.setCache(b); + } + + /** + * Learn whether to cache collections. Default is
true
. + * @return boolean cache flag. + */ + public synchronized boolean isCache() { + return w.isCache(); + } + /** * Add a ResourceSelector. * @param s the ResourceSelector to add.