# cachefileset [since 1.2] Constructs an Ant `fileset` consisting of artifacts in Ivy’s cache for a configuration. This is a post resolve task, with all the behaviour and attributes common to all post resolve tasks. Note that this task does not rely on retrieve, because the built fileset is made of artifacts directly in Ivy’s cache. Please prefer the use of retrieve + standard Ant path creation, which make your build more independent from Ivy (once artifacts are properly retrieved, Ivy is not required any more). Built `fileset` is registered in Ant project with a given id, and can thus be used like any other Ant `fileset` using `refid`. ## Limitation A `fileset`, in Ant project, requires a base directory from within which the files are included/excluded. The `cachefileset` task, in Ivy, internally tries to determine a common base directory across all the resolved artifact files that have been downloaded in the Ivy repository cache(s). Given that Ivy can be configured to use multiple repository caches and each one can potentially be on a different filesystem root, there are times, when `cachefileset` cannot determine a common base directory for these resolved artifacts. The `cachefileset` throws an exception in such cases. ## Alternative task If `cachefileset` doesn’t fit the need of your use case (maybe due to the limitations noted above), the resources task could be an alternative task to use in certain cases. ## Attributes
Attribute | Description | Required
--- | --- | ---
setid | the id to reference the built fileset | Yes
conf | a comma separated list of the configurations to put in the created path | No. Defaults to the configurations resolved by the last resolve call, or `*` if no resolve was explicitly called
type | comma separated list of artifact types to accept in the path, `*` for all | No. Defaults to `*`
settingsRef | (since 2.0) A reference to Ivy settings that must be used by this task | No, `ivy.instance` is taken by default.