MCPcopy Index your code
hub / github.com/nodejs/node / getHashCache

Function getHashCache

lib/internal/crypto/util.js:114–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112
113let _hashCache;
114function getHashCache() {
115 if (_hashCache === undefined) {
116 _hashCache = getCachedAliases();
117 if (isBuildingSnapshot()) {
118 // For dynamic linking, clear the map.
119 addSerializeCallback(() => { _hashCache = undefined; });
120 }
121 }
122 return _hashCache;
123}
124
125function getCachedHashId(algorithm) {
126 const result = getHashCache()[algorithm];

Callers 3

getCachedHashIdFunction · 0.85
HashFunction · 0.85
hashFunction · 0.85

Calls 2

isBuildingSnapshotFunction · 0.85
addSerializeCallbackFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…