使用 "node-cache" 模块为 node.js 应用程序缓存数据

Using "node-cache" module for caching data for node.js application

我正在使用 "node-cache" 模块在我的 node.js application.is 之一中缓存数据,那里提供任何 api "node-cache" 来检查缓存是否保持特定有没有数据的密钥?

您应该先检查 documentation

myCache.get( key, [callback] )

myCache.has( 键 )

Returns 布尔值,指示是否缓存密钥。