Node.js Integrations
NCache provides a Node.js client library for accessing a distributed cache from JavaScript applications. The library supports cache operations, SQL-like queries, locking, and Pub/Sub messaging. NCache also provides a session store for Express applications so that web application instances can share session data.
Important
Ensure the following development tools are installed on your Linux system when using NCache Node.js:
- g++
- make
Supported Client-Side Features for Node.js Cache
NCache supports the following client-side features for Node.js:
- CRUD Operations
- Expiration
- Locking
- Groups [Deprecated]
- Tags
- Named Tags
- SQL Queries
- Events
- Data Structures
- Pub/Sub Messaging
Session Management in Node.js Cache
In addition to the client APIs, NCache provides a session store for Node.js applications. In a web server farm, application instances can use this distributed store to access shared session data.
Express is a Node.js web application server framework specifically designed to build mobile and web applications. Express applications can use the express-session middleware to manage sessions. Configure NCache as the middleware’s custom store to keep session data in the distributed cache.
In this chapter, you will learn how to configure NCache as a session store for your Node.js application.
In This Section
Configure Sessions in Node.js
Explains how to configure and use NCache as a session store for Node.js applications.