
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Restful light weight in-memory cache server built on top of node.js and dinoloop.
Dinache is an open source RESTFUL light weight in-memory cache server built on top of node.js and dinoloop.
You can quickly setup a cache server via HTTP endpoint by installing a npm package. HTTP and JSON format are supported across variety of programming languages. Nodejs is known for handling millions of concurrent requests with less memory and Javascript objects are key-value pairs which makes Nodejs a perfect choice to build light weight in-memory cache server.
npm install dinache
import { Dinache } from 'dinache';
// Checks for process.env.PORT and if not found, starts in-memory cache server on default 8080 port.
new Dinache().start();
// Checks for process.env.PORT and if not found, starts in-memory cache server on provided 4200 port.
new Dinache(4200).start();
// GET key
{
query: {
op: 'GET',
key: 'key1'
}
}
// result
{
query: {
value: 'YOU_WILL_GET_VALUE'
}
}
// PUT key
{
query: {
op: 'PUT',
key: 'key1',
value: 'value1'
}
}
// result
{
query: { }
}
// or you receive the following error when you try to put a key which already exists.
{
query: {
error: 'KEY_EXISTS'
}
}
// DELETE key
{
query: {
op: 'DELETE',
key: 'key1'
}
}
// result is similar when you try to delete a key that exists or not.
{
query: { }
}
// UPSERT key
{
query: {
op: 'UPSERT',
key: 'key1',
value: 'value1'
}
}
// result is similar when you try to upsert a key that exists or not.
{
query: { }
}
// UPDATE key
{
query: {
op: 'UPDATE',
key: 'key1',
value: 'value1'
}
}
// result
{
query: { }
}
// or you receive the following error when you try to update a key which dont exists.
{
query: {
error: 'KEY_NOT_EXISTS'
}
}
You can also execute batch queries instead of making subsequent calls to server and reduce round-trips.
// batch-queries
{
batch: [{
op: 'GET',
key: 'key1'
}, {
op: 'PUT'
key: 'key2',
value: 'value2
}, {
op: 'PUT'
key: 'key2',
value: 'value2
}]
}
// result
{
batch: [{
value: 'value1'
}, {
},{
error: 'KEY_EXISTS'
}]
}
MIT Licensed.
FAQs
Restful light weight in-memory cache server built on top of node.js and dinoloop.
The npm package dinache receives a total of 11 weekly downloads. As such, dinache popularity was classified as not popular.
We found that dinache demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.