ncache-client

NCache is a 100% open Source in-memory distributed cache. NCache is an extremely fast and linearly scalable distributed cache that caches application data and reduces expensive database trips. Use NCache removes performance bottlenecks related to your data storage and databases and scales your node.js applications to extreme transaction processing (XTP).

Installation

NCache

NCache Node.js client requires a working NCache cluster to run. This cluster handles the storage and manipulation of the user data.

Client

npm install ncache-client

Overview

Usage

const ncache  = require('ncache-client');

//Initialize the Cache Cluster 
let cache = await ncache.CacheManager.getCache("test-Cache");

//Add data in Cache 
await cache.add('key', new ncache.CacheItem("Value"));

// Get the value associated with the given key from cache
const cacheValue = await cache.get('key', ncache.JsonDataType.Scaler);

console.log("Item in cache"+ cacheValue +" against key "+'key'); //Outputs 'Value'

//close the cache
await cache.close();

Features

  • Cache Performance, Cache Scalability, Bulk Operations, Indexes
  • Get, Add, Insert, Remove, Exists, Clear Cache, Expirations, Lock & Unlock
  • Key Based Dependency, File Based Dependency, SQL Dependency, Oracle Dependency
  • Publish/Subscribe (Pub/Sub) with Topic, Events with Data, Cached Item Specific Events (onInsert/onRemove), Cache Level Events (Add/Insert/Remove), Continuous Query
  • Groups/Subgroups, Tags, Named Tags
  • DataStructures : List, Queue, Counter

Getting Help

You can use the following channels for your questions and development/usage issues:

Contributing

We encourage any type of contribution in the form of issue reports.

Issue Reports

For issue reports, please share the following information with us to quickly resolve the problems.

  • NCache and the client version that you use
  • Environment and architecture information you use like total clients, cluster nodes, Node.js version,Java version, operating system etc.
  • Logs and stack traces, if any.
  • Detailed description of the steps to reproduce the issue.

Testing

In order to test NCache Node.js client locally, you will need the following:

  • Java 9 or later
  • NCache Installation

License

Alachisoft License.

Copyright

Copyright (c) 2021, Alachisoft, All Rights Reserved.

Visit https://www.alachisoft.com/ for more information.