文件名称:normalized-cache:用于存储规范化数据的缓存
文件大小:129KB
文件格式:ZIP
更新时间:2024-04-01 10:54:13
TypeScript
标准化缓存 此规范化的缓存提供以下功能: 数据(反规范化) 数据订阅 资料验证 数据无效 数据到期 计算字段 乐观更新 垃圾收集 该库压缩后约为5 KB。 设置 安装: npm install --save normalized-cache 用法 import { Cache , schema } from "normalized-cache" ; const Author = schema . object ( { name : "Author" , } ) ; const Post = schema . object ( { name : "Post" , fields : { author : Author , } , } ) ; const cache = new Cache ( { types : [ Post ] , } ) ; cache .
【文件预览】:
normalized-cache-main
----.gitattributes(18B)
----rollup.config.js(1KB)
----tsconfig.types.json(204B)
----.eslintrc.js(635B)
----src()
--------operations()
--------utils()
--------types.ts(596B)
--------index.ts(265B)
--------Cache.ts(13KB)
--------language()
--------__tests__()
--------schema()
----babel.config.json(272B)
----tsconfig.json(427B)
----jest.config.js(175B)
----README.md(9KB)
----docs()
--------Integration.md(5KB)
--------Schema.md(4KB)
--------CQL.md(2KB)
----.editorconfig(214B)
----.gitignore(77B)
----package-lock.json(359KB)
----package.json(2KB)