@wordpress/core-data
Version:
Access to and manipulation of core WordPress entities.
8 lines (7 loc) • 811 B
Source Map (JSON)
{
"version": 3,
"sources": ["../src/parsed-blocks-cache.js"],
"sourcesContent": ["/**\n * Shared cache of blocks parsed from an entity's `content` string, keyed by\n * `kind:name:id`. Populated both eagerly by the `getEntityRecord` resolver\n * (when the sync manager parses content for transient edits) and lazily by\n * `useEntityBlockEditor`. The stored `content` string acts as a validator so\n * stale entries are discarded when the underlying record changes.\n */\nexport const parsedBlocksCache = new Map();\n\nexport function getCacheKey( kind, name, id ) {\n\treturn `${ kind }:${ name }:${ id }`;\n}\n"],
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,IAAM,oBAAoB,oBAAI,IAAI;AAElC,SAAS,YAAa,MAAM,MAAM,IAAK;AAC7C,SAAO,GAAI,IAAK,IAAK,IAAK,IAAK,EAAG;AACnC;",
"names": []
}