This message was deleted.
# caching
s
This message was deleted.
k
I expect that the test case will be like below:
Copy code
def "returns different cache key for different paths"() {
        def archive = project.file("another.zip")
        def firstEntry = project.file("another/path/to/first")
        firstEntry.parentFile.mkdirs()
        firstEntry.text = "first"
        def secondEntry = project.file("another/path/to/second")
        secondEntry.text = "second"
        project.ant.zip(basedir: project.file("another"), destfile: archive)

        def firstResource = new FileCollectionBackedArchiveTextResource(project.services.get(FileOperations), project.services.get(TaskDependencyFactory),
            project.services.get(TemporaryFileProvider), project.layout.files(archive), "path/to/first", Charsets.UTF_8)
        def secondResource = new FileCollectionBackedArchiveTextResource(project.services.get(FileOperations), project.services.get(TaskDependencyFactory),
            project.services.get(TemporaryFileProvider), project.layout.files(archive), "path/to/second", Charsets.UTF_8)

        // TODO compare cache keys from these resource (expecting both has different cache key)
    }
FileSystemLocationFingerprint
and related classes could be related but not so sure…