Make dependencies cache more reliable on CI (#30534)
Make dependencies cache more reliable on CI (#30534)

Summary:
I was looking into why CI was failing and could not reproduce locally, also noticed the errors seemed to come from old version of files being used, for example a missing symbol added in a JSI commit ~1 month ago.  I noticed that we were using multiple cache keys for a lot of deps in the following format:

```
- v3-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}
- v3-pods-{{ .Environment.CIRCLE_JOB }}-
```

This means that if the cache doesn't exist for the checksum of the lockfile it will get one for any other checksum. This can lead to loading old version of files that cocoapod / yarn probably doesn't detect and keeps instead of getting the proper version. To make things worst it then caches the broken dep package after.

This removes all of these key fallbacks and use the cache only if we have a perfect match. This should make CI more reliable and fix random breaks after updating deps / pod configs.

## Changelog

[Internal] [Fixed] - Make dependencies cache more reliable on CI

Pull Request resolved: https://github.com/facebook/react-native/pull/30534

Test Plan:
- Check that tests now pass when cache is bypassed
- Check that it still passes with cache
- Hope the issue stops happening the next time someone updates deps :)

Reviewed By: fkgozali

Differential Revision: D25326131

Pulled By: hramos

fbshipit-source-id: f21cdfca7b2456ac0edbdcce3f9eb0a828a9b977

myntra/react-native,facebook/react-native,janicduplessis/react-native,javache/react-native,javache/react-native,javache/react-native,javache/react-native,pandiaraj44/react-native,pandiaraj44/react-native,janicduplessis/react-native,facebook/react-native,javache/react-native,myntra/react-native,myntra/react-native,facebook/react-native,pandiaraj44/react-native,myntra/react-native,myntra/react-native,arthuralee/react-native,facebook/react-native,arthuralee/react-native,facebook/react-native,facebook/react-native,janicduplessis/react-native,arthuralee/react-native,myntra/react-native,pandiaraj44/react-native,facebook/react-native,myntra/react-native,facebook/react-native,javache/react-native,pandiaraj44/react-native,javache/react-native,janicduplessis/react-native,janicduplessis/react-native,janicduplessis/react-native,pandiaraj44/react-native,arthuralee/react-native,janicduplessis/react-native,myntra/react-native,facebook/react-native,javache/react-native,javache/react-native,myntra/react-native,janicduplessis/react-native,pandiaraj44/react-native,pandiaraj44/react-native,arthuralee/react-native