INNER CODE UNIT · JavaScript

getCacheKey

react/metro · packages/metro-cache-key/src/index.js:15

export function getCacheKey(files: ReadonlyArray<string>): string {
  return files
    .reduce(
      (hash, file) => hash.update('\0', 'utf8').update(fs.readFileSync(file)),
      crypto.createHash('md5'),
    )
    .digest('hex');
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…