I tried clearing the cache through the API according to the documentation but it didn’t appear to have done anything. Is this known to not be working? If so, when can it be expected to be fixed?
FYI, I just cleared the cache through the UI (on CI 2.0) and it didn’t work either, so it may not just be an issue with the API.
This is intended functionality, though I definitely understand the confusion because it’s so different from 1.0. In 2.0, when you build without a cache, you’re just running a build without any caching whatsoever. When you clear the cache, nothing really happens.
The way to achieve what you want is to change the name of the key you’re using to cache. That results in a completely new, empty cache.
This is not a solution. We are using a fixed naming for the caching and “just change it” isn’t possible for us.
You can still change it. Just add
-v1 or some form of versioning to the cache.
+1 for a sane way to clear caches. We sometimes run into cases where a clean build is required, and we want the output of that build to be the new cache. Isn’t this a common enough use case that it shouldn’t require a code change?
I can only imagine we will properly support cache clearing in the future, but we’re not there yet. As 2.0 stands today, changing the cache name is the only option.
I’ve corrupted enough of my own caches to fully understand the pain you’re experiencing. It can change a simple cache name into something a bit more cumbersome. But it’s literally the only option at this time.
Cache not cleared
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.