| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5ccb29d commit 8b89ef0
9 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -55,7 +55,7 @@ The action defaults to searching for a dependency file (`requirements.txt` for p | |||
| 55 | 55 | ||
| 56 | 56 | - For `pip`, the action will cache the global cache directory | |
| 57 | 57 | - For `pipenv`, the action will cache virtualenv directory | |
| 58 | - - For `poetry`, the action will cache virtualenv directory | ||
| 58 | + - For `poetry`, the action will cache virtualenv directories -- one for each poetry project found | ||
| 59 | 59 | ||
| 60 | 60 | **Caching pip dependencies:** | |
| 61 | 61 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,8 +1,10 @@ | |||
| 1 | + import * as path from 'path'; | ||
| 1 | 2 | import * as core from '@actions/core'; | |
| 2 | 3 | import * as cache from '@actions/cache'; | |
| 3 | 4 | import * as exec from '@actions/exec'; | |
| 4 | 5 | import * as io from '@actions/io'; | |
| 5 | 6 | import {getCacheDistributor} from '../src/cache-distributions/cache-factory'; | |
| 7 | + import {State} from '../src/cache-distributions/cache-distributor'; | ||
| 6 | 8 | import * as utils from './../src/utils'; | |
| 7 | 9 | ||
| 8 | 10 | describe('restore-cache', () => { | |
@@ -13,7 +15,7 @@ describe('restore-cache', () => { | |||
| 13 | 15 | const requirementsLinuxHash = | |
| 14 | 16 | '2d0ff7f46b0e120e3d3294db65768b474934242637b9899b873e6283dfd16d7c'; | |
| 15 | 17 | const poetryLockHash = | |
| 16 | - '571bf984f8d210e6a97f854e479fdd4a2b5af67b5fdac109ec337a0ea16e7836'; | ||
| 18 | + 'f24ea1ad73968e6c8d80c16a093ade72d9332c433aeef979a0dd943e6a99b2ab'; | ||
| 17 | 19 | const poetryConfigOutput = ` | |
| 18 | 20 | cache-dir = "/Users/patrick/Library/Caches/pypoetry" | |
| 19 | 21 | experimental.new-installer = false | |
@@ -27,7 +29,7 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py | |||
| 27 | 29 | let infoSpy: jest.SpyInstance; | |
| 28 | 30 | let warningSpy: jest.SpyInstance; | |
| 29 | 31 | let debugSpy: jest.SpyInstance; | |
| 30 | - let saveSatetSpy: jest.SpyInstance; | ||
| 32 | + let saveStateSpy: jest.SpyInstance; | ||
| 31 | 33 | let getStateSpy: jest.SpyInstance; | |
| 32 | 34 | let setOutputSpy: jest.SpyInstance; | |
| 33 | 35 | ||
@@ -52,8 +54,8 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py | |||
| 52 | 54 | debugSpy = jest.spyOn(core, 'debug'); | |
| 53 | 55 | debugSpy.mockImplementation(input => undefined); | |
| 54 | 56 | ||
| 55 | - saveSatetSpy = jest.spyOn(core, 'saveState'); | ||
| 56 | - saveSatetSpy.mockImplementation(input => undefined); | ||
| 57 | + saveStateSpy = jest.spyOn(core, 'saveState'); | ||
| 58 | + saveStateSpy.mockImplementation(input => undefined); | ||
| 57 | 59 | ||
| 58 | 60 | getStateSpy = jest.spyOn(core, 'getState'); | |
| 59 | 61 | getStateSpy.mockImplementation(input => undefined); | |
@@ -100,21 +102,68 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py | |||
| 100 | 102 | ||
| 101 | 103 | describe('Restore dependencies', () => { | |
| 102 | 104 | it.each([ | |
| 103 | - ['pip', '3.8.12', undefined, requirementsHash], | ||
| 104 | - ['pip', '3.8.12', '**/requirements-linux.txt', requirementsLinuxHash], | ||
| 105 | + [ | ||
| 106 | + 'pip', | ||
| 107 | + '3.8.12', | ||
| 108 | + '__tests__/data/**/requirements.txt', | ||
| 109 | + requirementsHash, | ||
| 110 | + undefined | ||
| 111 | + ], | ||
| 112 | + [ | ||
| 113 | + 'pip', | ||
| 114 | + '3.8.12', | ||
| 115 | + '__tests__/data/**/requirements-linux.txt', | ||
| 116 | + requirementsLinuxHash, | ||
| 117 | + undefined | ||
| 118 | + ], | ||
| 105 | 119 | [ | |
| 106 | 120 | 'pip', | |
| 107 | 121 | '3.8.12', | |
| 108 | 122 | '__tests__/data/requirements-linux.txt', | |
| 109 | - requirementsLinuxHash | ||
| 123 | + requirementsLinuxHash, | ||
| 124 | + undefined | ||
| 110 | 125 | ], | |
| 111 | - ['pip', '3.8.12', '__tests__/data/requirements.txt', requirementsHash], | ||
| 112 | - ['pipenv', '3.9.1', undefined, pipFileLockHash], | ||
| 113 | - ['pipenv', '3.9.12', '__tests__/data/requirements.txt', requirementsHash], | ||
| 114 | - ['poetry', '3.9.1', undefined, poetryLockHash] | ||
| 126 | + [ | ||
| 127 | + 'pip', | ||
| 128 | + '3.8.12', | ||
| 129 | + '__tests__/data/requirements.txt', | ||
| 130 | + requirementsHash, | ||
| 131 | + undefined | ||
| 132 | + ], | ||
| 133 | + [ | ||
| 134 | + 'pipenv', | ||
| 135 | + '3.9.1', | ||
| 136 | + '__tests__/data/**/Pipfile.lock', | ||
| 137 | + pipFileLockHash, | ||
| 138 | + undefined | ||
| 139 | + ], | ||
| 140 | + [ | ||
| 141 | + 'pipenv', | ||
| 142 | + '3.9.12', | ||
| 143 | + '__tests__/data/requirements.txt', | ||
| 144 | + requirementsHash, | ||
| 145 | + undefined | ||
| 146 | + ], | ||
| 147 | + [ | ||
| 148 | + 'poetry', | ||
| 149 | + '3.9.1', | ||
| 150 | + '__tests__/data/**/poetry.lock', | ||
| 151 | + poetryLockHash, | ||
| 152 | + [ | ||
| 153 | + '/Users/patrick/Library/Caches/pypoetry/virtualenvs', | ||
| 154 | + path.join(__dirname, 'data', 'inner', '.venv'), | ||
| 155 | + path.join(__dirname, 'data', '.venv') | ||
| 156 | + ] | ||
| 157 | + ] | ||
| 115 | 158 | ])( | |
| 116 | 159 | 'restored dependencies for %s by primaryKey', | |
| 117 | - async (packageManager, pythonVersion, dependencyFile, fileHash) => { | ||
| 160 | + async ( | ||
| 161 | + packageManager, | ||
| 162 | + pythonVersion, | ||
| 163 | + dependencyFile, | ||
| 164 | + fileHash, | ||
| 165 | + cachePaths | ||
| 166 | + ) => { | ||
| 118 | 167 | const cacheDistributor = getCacheDistributor( | |
| 119 | 168 | packageManager, | |
| 120 | 169 | pythonVersion, | |
@@ -123,10 +172,21 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py | |||
| 123 | 172 | ||
| 124 | 173 | await cacheDistributor.restoreCache(); | |
| 125 | 174 | ||
| 175 | + if (cachePaths !== undefined) { | ||
| 176 | + expect(saveStateSpy).toHaveBeenCalledWith( | ||
| 177 | + State.CACHE_PATHS, | ||
| 178 | + cachePaths | ||
| 179 | + ); | ||
| 180 | + } | ||
| 181 | + | ||
| 126 | 182 | if (process.platform === 'linux' && packageManager === 'pip') { | |
| 127 | 183 | expect(infoSpy).toHaveBeenCalledWith( | |
| 128 | 184 | `Cache restored from key: setup-python-${process.env['RUNNER_OS']}-20.04-Ubuntu-python-${pythonVersion}-${packageManager}-${fileHash}` | |
| 129 | 185 | ); | |
| 186 | + } else if (packageManager === 'poetry') { | ||
| 187 | + expect(infoSpy).toHaveBeenCalledWith( | ||
| 188 | + `Cache restored from key: setup-python-${process.env['RUNNER_OS']}-python-${pythonVersion}-${packageManager}-v2-${fileHash}` | ||
| 189 | + ); | ||
| 130 | 190 | } else { | |
| 131 | 191 | expect(infoSpy).toHaveBeenCalledWith( | |
| 132 | 192 | `Cache restored from key: setup-python-${process.env['RUNNER_OS']}-python-${pythonVersion}-${packageManager}-${fileHash}` | |
@@ -164,18 +224,23 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py | |||
| 164 | 224 | ||
| 165 | 225 | describe('Dependencies changed', () => { | |
| 166 | 226 | it.each([ | |
| 167 | - ['pip', '3.8.12', undefined, pipFileLockHash], | ||
| 168 | - ['pip', '3.8.12', '**/requirements-linux.txt', pipFileLockHash], | ||
| 227 | + ['pip', '3.8.12', '__tests__/data/**/requirements.txt', pipFileLockHash], | ||
| 228 | + [ | ||
| 229 | + 'pip', | ||
| 230 | + '3.8.12', | ||
| 231 | + '__tests__/data/**/requirements-linux.txt', | ||
| 232 | + pipFileLockHash | ||
| 233 | + ], | ||
| 169 | 234 | [ | |
| 170 | 235 | 'pip', | |
| 171 | 236 | '3.8.12', | |
| 172 | 237 | '__tests__/data/requirements-linux.txt', | |
| 173 | 238 | pipFileLockHash | |
| 174 | 239 | ], | |
| 175 | 240 | ['pip', '3.8.12', '__tests__/data/requirements.txt', pipFileLockHash], | |
| 176 | - ['pipenv', '3.9.1', undefined, requirementsHash], | ||
| 241 | + ['pipenv', '3.9.1', '__tests__/data/**/Pipfile.lock', requirementsHash], | ||
| 177 | 242 | ['pipenv', '3.9.12', '__tests__/data/requirements.txt', requirementsHash], | |
| 178 | - ['poetry', '3.9.1', undefined, requirementsHash] | ||
| 243 | + ['poetry', '3.9.1', '__tests__/data/**/poetry.lock', requirementsHash] | ||
| 179 | 244 | ])( | |
| 180 | 245 | 'restored dependencies for %s by primaryKey', | |
| 181 | 246 | async (packageManager, pythonVersion, dependencyFile, fileHash) => { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,7 +18,7 @@ describe('run', () => { | |||
| 18 | 18 | let infoSpy: jest.SpyInstance; | |
| 19 | 19 | let warningSpy: jest.SpyInstance; | |
| 20 | 20 | let debugSpy: jest.SpyInstance; | |
| 21 | - let saveSatetSpy: jest.SpyInstance; | ||
| 21 | + let saveStateSpy: jest.SpyInstance; | ||
| 22 | 22 | let getStateSpy: jest.SpyInstance; | |
| 23 | 23 | let getInputSpy: jest.SpyInstance; | |
| 24 | 24 | let setFailedSpy: jest.SpyInstance; | |
@@ -43,8 +43,8 @@ describe('run', () => { | |||
| 43 | 43 | debugSpy = jest.spyOn(core, 'debug'); | |
| 44 | 44 | debugSpy.mockImplementation(input => undefined); | |
| 45 | 45 | ||
| 46 | - saveSatetSpy = jest.spyOn(core, 'saveState'); | ||
| 47 | - saveSatetSpy.mockImplementation(input => undefined); | ||
| 46 | + saveStateSpy = jest.spyOn(core, 'saveState'); | ||
| 47 | + saveStateSpy.mockImplementation(input => undefined); | ||
| 48 | 48 | ||
| 49 | 49 | getStateSpy = jest.spyOn(core, 'getState'); | |
| 50 | 50 | getStateSpy.mockImplementation(input => { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1 @@ | |||
| 1 | + ../pyproject.toml | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -59711,6 +59711,9 @@ class CacheDistributor { | |||
| 59711 | 59711 | this.cacheDependencyPath = cacheDependencyPath; | |
| 59712 | 59712 | this.CACHE_KEY_PREFIX = 'setup-python'; | |
| 59713 | 59713 | } | |
| 59714 | + handleLoadedCache() { | ||
| 59715 | + return __awaiter(this, void 0, void 0, function* () { }); | ||
| 59716 | + } | ||
| 59714 | 59717 | restoreCache() { | |
| 59715 | 59718 | return __awaiter(this, void 0, void 0, function* () { | |
| 59716 | 59719 | const { primaryKey, restoreKey } = yield this.computeKeys(); | |
@@ -59723,6 +59726,7 @@ class CacheDistributor { | |||
| 59723 | 59726 | core.saveState(State.CACHE_PATHS, cachePath); | |
| 59724 | 59727 | core.saveState(State.STATE_CACHE_PRIMARY_KEY, primaryKey); | |
| 59725 | 59728 | const matchedKey = yield cache.restoreCache(cachePath, primaryKey, restoreKey); | |
| 59729 | + yield this.handleLoadedCache(); | ||
| 59726 | 59730 | this.handleMatchResult(matchedKey, primaryKey); | |
| 59727 | 59731 | }); | |
| 59728 | 59732 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -65787,6 +65787,9 @@ class CacheDistributor { | |||
| 65787 | 65787 | this.cacheDependencyPath = cacheDependencyPath; | |
| 65788 | 65788 | this.CACHE_KEY_PREFIX = 'setup-python'; | |
| 65789 | 65789 | } | |
| 65790 | + handleLoadedCache() { | ||
| 65791 | + return __awaiter(this, void 0, void 0, function* () { }); | ||
| 65792 | + } | ||
| 65790 | 65793 | restoreCache() { | |
| 65791 | 65794 | return __awaiter(this, void 0, void 0, function* () { | |
| 65792 | 65795 | const { primaryKey, restoreKey } = yield this.computeKeys(); | |
@@ -65799,6 +65802,7 @@ class CacheDistributor { | |||
| 65799 | 65802 | core.saveState(State.CACHE_PATHS, cachePath); | |
| 65800 | 65803 | core.saveState(State.STATE_CACHE_PRIMARY_KEY, primaryKey); | |
| 65801 | 65804 | const matchedKey = yield cache.restoreCache(cachePath, primaryKey, restoreKey); | |
| 65805 | + yield this.handleLoadedCache(); | ||
| 65802 | 65806 | this.handleMatchResult(matchedKey, primaryKey); | |
| 65803 | 65807 | }); | |
| 65804 | 65808 | } | |
@@ -66078,6 +66082,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge | |||
| 66078 | 66082 | step((generator = generator.apply(thisArg, _arguments || [])).next()); | |
| 66079 | 66083 | }); | |
| 66080 | 66084 | }; | |
| 66085 | + var __asyncValues = (this && this.__asyncValues) || function (o) { | ||
| 66086 | + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||
| 66087 | + var m = o[Symbol.asyncIterator], i; | ||
| 66088 | + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); | ||
| 66089 | + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } | ||
| 66090 | + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } | ||
| 66091 | + }; | ||
| 66081 | 66092 | var __importDefault = (this && this.__importDefault) || function (mod) { | |
| 66082 | 66093 | return (mod && mod.__esModule) ? mod : { "default": mod }; | |
| 66083 | 66094 | }; | |
@@ -66090,51 +66101,82 @@ const core = __importStar(__nccwpck_require__(2186)); | |||
| 66090 | 66101 | const cache_distributor_1 = __importDefault(__nccwpck_require__(8953)); | |
| 66091 | 66102 | const utils_1 = __nccwpck_require__(1314); | |
| 66092 | 66103 | class PoetryCache extends cache_distributor_1.default { | |
| 66093 | - constructor(pythonVersion, patterns = '**/poetry.lock') { | ||
| 66104 | + constructor(pythonVersion, patterns = '**/poetry.lock', poetryProjects = new Set()) { | ||
| 66094 | 66105 | super('poetry', patterns); | |
| 66095 | 66106 | this.pythonVersion = pythonVersion; | |
| 66096 | 66107 | this.patterns = patterns; | |
| 66108 | + this.poetryProjects = poetryProjects; | ||
| 66097 | 66109 | } | |
| 66098 | 66110 | getCacheGlobalDirectories() { | |
| 66111 | + var e_1, _a; | ||
| 66099 | 66112 | return __awaiter(this, void 0, void 0, function* () { | |
| 66100 | - const poetryConfig = yield this.getPoetryConfiguration(); | ||
| 66101 | - const cacheDir = poetryConfig['cache-dir']; | ||
| 66102 | - const virtualenvsPath = poetryConfig['virtualenvs.path'].replace('{cache-dir}', cacheDir); | ||
| 66103 | - const paths = [virtualenvsPath]; | ||
| 66104 | - if (poetryConfig['virtualenvs.in-project'] === true) { | ||
| 66105 | - paths.push(path.join(process.cwd(), '.venv')); | ||
| 66106 | - } | ||
| 66107 | - const pythonLocation = yield io.which('python'); | ||
| 66108 | - if (pythonLocation) { | ||
| 66109 | - core.debug(`pythonLocation is ${pythonLocation}`); | ||
| 66110 | - const { exitCode, stderr } = yield exec.getExecOutput(`poetry env use ${pythonLocation}`, undefined, { ignoreReturnCode: true }); | ||
| 66111 | - if (exitCode) { | ||
| 66112 | - utils_1.logWarning(stderr); | ||
| 66113 | + // Same virtualenvs path may appear for different projects, hence we use a Set | ||
| 66114 | + const paths = new Set(); | ||
| 66115 | + const globber = yield glob.create(this.patterns); | ||
| 66116 | + try { | ||
| 66117 | + for (var _b = __asyncValues(globber.globGenerator()), _c; _c = yield _b.next(), !_c.done;) { | ||
| 66118 | + const file = _c.value; | ||
| 66119 | + const basedir = path.dirname(file); | ||
| 66120 | + core.debug(`Processing Poetry project at ${basedir}`); | ||
| 66121 | + this.poetryProjects.add(basedir); | ||
| 66122 | + const poetryConfig = yield this.getPoetryConfiguration(basedir); | ||
| 66123 | + const cacheDir = poetryConfig['cache-dir']; | ||
| 66124 | + const virtualenvsPath = poetryConfig['virtualenvs.path'].replace('{cache-dir}', cacheDir); | ||
| 66125 | + paths.add(virtualenvsPath); | ||
| 66126 | + if (poetryConfig['virtualenvs.in-project']) { | ||
| 66127 | + paths.add(path.join(basedir, '.venv')); | ||
| 66128 | + } | ||
| 66113 | 66129 | } | |
| 66114 | 66130 | } | |
| 66115 | - else { | ||
| 66116 | - utils_1.logWarning('python binaries were not found in PATH'); | ||
| 66131 | + catch (e_1_1) { e_1 = { error: e_1_1 }; } | ||
| 66132 | + finally { | ||
| 66133 | + try { | ||
| 66134 | + if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); | ||
| 66135 | + } | ||
| 66136 | + finally { if (e_1) throw e_1.error; } | ||
| 66117 | 66137 | } | |
| 66118 | - return paths; | ||
| 66138 | + return [...paths]; | ||
| 66119 | 66139 | }); | |
| 66120 | 66140 | } | |
| 66121 | 66141 | computeKeys() { | |
| 66122 | 66142 | return __awaiter(this, void 0, void 0, function* () { | |
| 66123 | 66143 | const hash = yield glob.hashFiles(this.patterns); | |
| 66124 | - const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-${hash}`; | ||
| 66144 | + // "v2" is here to invalidate old caches of this cache distributor, which were created broken: | ||
| 66145 | + const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-v2-${hash}`; | ||
| 66125 | 66146 | const restoreKey = undefined; | |
| 66126 | 66147 | return { | |
| 66127 | 66148 | primaryKey, | |
| 66128 | 66149 | restoreKey | |
| 66129 | 66150 | }; | |
| 66130 | 66151 | }); | |
| 66131 | 66152 | } | |
| 66132 | - getPoetryConfiguration() { | ||
| 66153 | + handleLoadedCache() { | ||
| 66154 | + const _super = Object.create(null, { | ||
| 66155 | + handleLoadedCache: { get: () => super.handleLoadedCache } | ||
| 66156 | + }); | ||
| 66157 | + return __awaiter(this, void 0, void 0, function* () { | ||
| 66158 | + yield _super.handleLoadedCache.call(this); | ||
| 66159 | + // After the cache is loaded -- make sure virtualenvs use the correct Python version (the one that we have just installed). | ||
| 66160 | + // This will handle invalid caches, recreating virtualenvs if necessary. | ||
| 66161 | + const pythonLocation = yield io.which('python'); | ||
| 66162 | + if (pythonLocation) { | ||
| 66163 | + core.debug(`pythonLocation is ${pythonLocation}`); | ||
| 66164 | + } | ||
| 66165 | + else { | ||
| 66166 | + utils_1.logWarning('python binaries were not found in PATH'); | ||
| 66167 | + return; | ||
| 66168 | + } | ||
| 66169 | + for (const poetryProject of this.poetryProjects) { | ||
| 66170 | + const { exitCode, stderr } = yield exec.getExecOutput('poetry', ['env', 'use', pythonLocation], { ignoreReturnCode: true, cwd: poetryProject }); | ||
| 66171 | + if (exitCode) { | ||
| 66172 | + utils_1.logWarning(stderr); | ||
| 66173 | + } | ||
| 66174 | + } | ||
| 66175 | + }); | ||
| 66176 | + } | ||
| 66177 | + getPoetryConfiguration(basedir) { | ||
| 66133 | 66178 | return __awaiter(this, void 0, void 0, function* () { | |
| 66134 | - const { stdout, stderr, exitCode } = yield exec.getExecOutput('poetry', [ | ||
| 66135 | - 'config', | ||
| 66136 | - '--list' | ||
| 66137 | - ]); | ||
| 66179 | + const { stdout, stderr, exitCode } = yield exec.getExecOutput('poetry', ['config', '--list'], { cwd: basedir }); | ||
| 66138 | 66180 | if (exitCode && stderr) { | |
| 66139 | 66181 | throw new Error('Could not get cache folder path for poetry package manager'); | |
| 66140 | 66182 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,6 +19,7 @@ abstract class CacheDistributor { | |||
| 19 | 19 | primaryKey: string; | |
| 20 | 20 | restoreKey: string[] | undefined; | |
| 21 | 21 | }>; | |
| 22 | + protected async handleLoadedCache() {} | ||
| 22 | 23 | ||
| 23 | 24 | public async restoreCache() { | |
| 24 | 25 | const {primaryKey, restoreKey} = await this.computeKeys(); | |
@@ -41,6 +42,8 @@ abstract class CacheDistributor { | |||
| 41 | 42 | restoreKey | |
| 42 | 43 | ); | |
| 43 | 44 | ||
| 45 | + await this.handleLoadedCache(); | ||
| 46 | + | ||
| 44 | 47 | this.handleMatchResult(matchedKey, primaryKey); | |
| 45 | 48 | } | |
| 46 | 49 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments