![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@cuo9958/local_cache
Advanced tools
利用双缓存的优势接管本地缓存。并发情况下避免同时刷新数据的尴尬。
参数maxAge
,缓存的存活时间,单位是毫秒。
参数update
,本地缓存失效之后的更新方法。
function update() {
console.log("更新一次");
return Date.now();
}
const cache = new LocalCache({
maxAge: 1000,
update
});
获取使用的是 Promise 方式,需要处理调用方式。
cache.get("test").then(res => {
console.log(res);
});
设置值,参数固定是string,值没有限制。可以提前设置值,避免首次启动的卡顿。
cache.set("test", 123);
FAQs
nodejs双缓存
The npm package @cuo9958/local_cache receives a total of 0 weekly downloads. As such, @cuo9958/local_cache popularity was classified as not popular.
We found that @cuo9958/local_cache demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.