How to Cache bust?

Hi,
I’d like to use the cache feature with my Carthage build folder as described here. The caching itself works fine and carthage uses the cached builds.

The question is how can I discard the cache? I thought that by modifying the ./Carthage/Cachefile and triggering a new build, the cache would be discarded:

$ date > ./Carthage/Cachefile
git add ./Carthage/Cachefile
git commit -m "cache bust"
git push origin develop

But on the new build, I still see in the bitrise output of the Carthage step:

Using cached dependencies for bootstrap command. If you would like to force update your dependencies, select update as CarthageCommand and re-run your build.

I could do that but it means modifying the workflow manually which defeats the purpose of automation. What did I miss?

cheers

Hi @JanC,
Could you send me the URL of the given build?
Cheers

Hi,
the build that reused the cache even if the cache file was modified is this one

The one just before it where the cache was correctly used is here

The bitrise cache push settings are set to

./PEMap/Carthage -> ./PEMap/Cartfile.resolved

And the diff between those two builds is the following (two new empty lines)

git diff 51b0561
diff --git a/PEMap/Cartfile.resolved b/PEMap/Cartfile.resolved
index 3c89d3f..3eb3b4c 100644
--- a/PEMap/Cartfile.resolved
+++ b/PEMap/Cartfile.resolved
@@ -11,3 +11,5 @@ github "radex/SwiftyUserDefaults" "3.0.1"
 github "robbiehanson/CocoaAsyncSocket" "f33ea53c298fcad69d55f387ead174e30c2446cf"
 github "stephencelis/SQLite.swift" "0.11.5"
 github "vikmeup/SCLAlertView-Swift" "86ea7613c99cd4896765fabfa773b39b40bc8590"
+
+

The cache settings are a bit different from my original post but the behaviour is the same.
cheers

Hy @JanC!

In the build where there is still cache, you still use carthage bootstrap. that is why there is still cache.
run a build with carthage update this time it will not cache and the next time you ru a build there will be no cache.

Hi,
ok thanks I belive that was the problem. Thanks for looking into it.

cheers

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.