Readability improvement: rename PipenvCache,PoetryCache "patterns" field to "cacheDependencyPath" to be consistent with base class and cache-factory.

This commit is contained in:
Sam Pinkus 2025-01-08 16:01:51 +10:00
parent 6ca8e8598f
commit 1f3a570584
2 changed files with 7 additions and 7 deletions

View file

@ -8,9 +8,9 @@ import CacheDistributor from './cache-distributor';
class PipenvCache extends CacheDistributor {
constructor(
private pythonVersion: string,
protected patterns: string = '**/Pipfile.lock'
protected cacheDependencyPath: string = '**/Pipfile.lock'
) {
super('pipenv', patterns);
super('pipenv', cacheDependencyPath);
}
protected async getCacheGlobalDirectories() {
@ -31,7 +31,7 @@ class PipenvCache extends CacheDistributor {
}
protected async computeKeys() {
const hash = await glob.hashFiles(this.patterns);
const hash = await glob.hashFiles(this.cacheDependencyPath);
const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}-python-${this.pythonVersion}-${this.packageManager}-${hash}`;
const restoreKey = undefined;
return {