Class Cache
Constructors
constructor
-
Parameters
-
-
__namedParameters: object
-
check: boolean
-
-
immutable: boolean
Properties
cacheKey
cacheKey: string
immutable
immutable: boolean
Private mutexes
mutexes
: Map<LocatorHash, Promise<keyof []>> = new Map()
Accessors
mirrorCwd
- get mirrorCwd(): null | string & object
-
Returns null
|
string
&
object
Methods
fetchPackageFromCache
- fetchPackageFromCache(locator: Locator, expectedChecksum: string | null, __namedParameters: object): Promise<[]>
-
Parameters
-
-
expectedChecksum: string | null
-
__namedParameters: object
-
loader: undefined | function
-
onHit: undefined | function
-
onMiss: undefined | function
-
skipIntegrityCheck: undefined | false | true
Returns Promise<[]>
getChecksumFilename
- getChecksumFilename(locator: Locator, checksum: string): string & object
-
Parameters
Returns string
&
object
getLocatorMirrorPath
- getLocatorMirrorPath(locator: Locator): null | string & object
-
Parameters
Returns null
|
string
&
object
getLocatorPath
- getLocatorPath(locator: Locator, expectedChecksum: string | null): null | string & object
-
Parameters
-
-
expectedChecksum: string | null
Returns null
|
string
&
object
getVersionFilename
- getVersionFilename(locator: Locator): string & object
-
Parameters
Returns string
&
object
Private writeFileWithLock
- writeFileWithLock<T>(file: PortablePath | null, generator: function): Promise<T>
-
Type parameters
Parameters
Returns Promise<T>
Static find
-
Parameters
-
-
Default value __namedParameters: object = {}
-
check: undefined | false | true
-
immutable: undefined | false | true
Returns Promise<Cache>