grab / grab/cocoapods-binary-cache

Feature Request: Versioned Cache

Open
#46 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.