我可以为Node.js应用程序使用会话缓存服务吗?

时间:2021-12-17 18:59:34

How can I use the Bluemix Session Cache service with a Node.js application? Can I use data cache for session caching with a Node.js application?

如何将Bluemix会话缓存服务与Node.js应用程序一起使用?我可以使用数据缓存进行Node.js应用程序的会话缓存吗?

1 个解决方案

#1


2  

If your application is using the express-session module, you can access an early Beta version of a middleware implementation for express session. You can find it on the npm registry.

如果您的应用程序使用快速会话模块,则可以访问早期Beta版本的中间件实现以进行快速会话。你可以在npm注册表中找到它。

If you are not using the express-session module, store the session objects in the data cache using REST API calls and then retrieve the objects manually if the session object does not exist in memory.

如果未使用快速会话模块,请使用REST API调用将会话对象存储在数据高速缓存中,如果内存中不存在会话对象,则手动检索对象。

#1


2  

If your application is using the express-session module, you can access an early Beta version of a middleware implementation for express session. You can find it on the npm registry.

如果您的应用程序使用快速会话模块,则可以访问早期Beta版本的中间件实现以进行快速会话。你可以在npm注册表中找到它。

If you are not using the express-session module, store the session objects in the data cache using REST API calls and then retrieve the objects manually if the session object does not exist in memory.

如果未使用快速会话模块,请使用REST API调用将会话对象存储在数据高速缓存中,如果内存中不存在会话对象,则手动检索对象。