| 63 | } |
| 64 | |
| 65 | protected async computeKeys() { |
| 66 | const hash = |
| 67 | (await glob.hashFiles(this.cacheDependencyPath)) || |
| 68 | (await glob.hashFiles(this.cacheDependencyBackupPath)); |
| 69 | const osSegment = await this.getLinuxInfoKeySegment(); |
| 70 | const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}${osSegment}-python-${this.pythonVersion}-${this.packageManager}-${hash}`; |
| 71 | const restoreKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}${osSegment}-python-${this.pythonVersion}-${this.packageManager}`; |
| 72 | |
| 73 | return { |
| 74 | primaryKey, |
| 75 | restoreKey: [restoreKey] |
| 76 | }; |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | export default PipCache; |