grab / grab/cocoapods-binary-cache
Feature Request: Versioned Cache
- Dominant language
- Ruby
- Stars
- 488
- Forks
- 69
- PR merge metrics
- No merged PRs in 30d
Description
### Checklist
- [x] I've read the [Contribution Guidelines](https://github.com/grab/cocoapods-binary-cache/blob/master/CONTRIBUTING.md)
- [x] I've searched for [existing GitHub issues](https://github.com/grab/cocoapods-binary-cache/issues) if there was such a request before.
### Description
#### Motivation
Our team follows Git Flow practice and maintains multiple branches referring to different versions of a Pod. Especially when we decides to upgrade a Pod's major version, it takes several code reviews and assessment rounds to pin a single version across the entire repo.
Since the remote repo managed by `cocoapods-binary-cache` is not versioned, only a few branches in our project benefit from using a shared cache. More importantly, when someone unaware of the version change accidentally pushes to remote cache, the fun game of swapping cached version begins.
#### Summary
A preliminary proposal is to put cached `zip`s in subfolders whose name matches the lock hash in `Podfile.lock` and `Manifest.lock`.
For example:
```
GeneratedFrameworks/Protobuf/2ccbaf193f6c65adc67745453ca0c13234c32796/Protobuf.zip
```
Or simply:
```
GeneratedFrameworks/Protobuf/2ccbaf193f6c65adc67745453ca0c13234c32796.zip
```
Versioned `Manifest.lock`s can also be cached this way. Though I have no idea why this file is required as the remote cache should not care about Pods not hosted there.
Contributor guide
Assessment
This issue has not been assessed yet.