Seemlessly integrate with one or more databases.
Find Out MoreIf multiple databases are configured, the reading and writing behave as if it is a caching system. When writing to RedKV, the key-value pair gets to write to all databases. When getting a key, RedKV sequentially tries a database from the front of the list, moves on to the next database if the key was not found, and stops until the key is found in a database. After that, the key-value pair is filled to all the databases in front of the list, up to the database where the key is actually found, just like filling a cache.
let kvStore = new RedKV(); kvStore.addStore('redis'); kvStore.addStore('dynamodb', { region: "us-east-1", endpoint: "https://DynamoDB.us-east-1.amazonaws.com", tableName: 'dev.calculator' });
Sets a key-value pair to the store. Returns a Promise which resolves if succeeded.
Gets a Promise which resolves to the value of the key or null.
Returns a Promise which resolves to a bool indicating if the key exists.
Deletes the key. Promise resolves after finishing.