Skip to content

Commit 01fea7e

Browse files
committed
primary key
1 parent 5158e54 commit 01fea7e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/LayerCache.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ class LayerCache {
147147

148148
// ---
149149

150-
async restore(key: string, restoreKeys?: string[]) {
151-
const restoredCacheKey = await this.restoreRoot(restoreKeys)
150+
async restore(primaryKey: string, restoreKeys?: string[]) {
151+
const restoredCacheKey = await this.restoreRoot(primaryKey, restoreKeys)
152152
if (restoredCacheKey === undefined) {
153153
core.info(`Root cache could not be found. aborting.`)
154154
return undefined
@@ -165,9 +165,9 @@ class LayerCache {
165165
return restoredCacheKey
166166
}
167167

168-
private async restoreRoot(restoreKeys?: string[]): Promise<string | undefined> {
168+
private async restoreRoot(primaryKey: string, restoreKeys?: string[]): Promise<string | undefined> {
169169
core.debug(`Trying to restore root cache: ${ JSON.stringify({ restoreKeys, dir: this.getUnpackedTarDir() }) }`)
170-
const restoredRootKey = await cache.restoreCache([this.getUnpackedTarDir()], ``, restoreKeys)
170+
const restoredRootKey = await cache.restoreCache([this.getUnpackedTarDir()], primaryKey, restoreKeys)
171171
core.debug(`restoredRootKey: ${restoredRootKey}`)
172172
if (restoredRootKey === undefined) {
173173
return undefined

0 commit comments

Comments
 (0)