V8

v8.cachedDataVersionTag()

Provides a tag derived from V8 version, flags and CPU features, useful for cached-data compatibility. It is not a cryptographic integrity check. Tested on Node.js 22.16.0. Example output (one line per entry): ["true true"].

Formal Syntax & Structure

nodejs syntaxnodejs
v8.cachedDataVersionTag()

Return Value

number

Runtime-dependent cache tag.

Working Example

Example Snippetnodejs
import { cachedDataVersionTag } from 'node:v8';const a = cachedDataVersionTag();console.log(Number.isInteger(a), a === cachedDataVersionTag());
Node.js Reference