
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
querymemcache
Advanced tools
querymemcache is a node.js module designed to allow you to cache the frequent queries to the DB with using of memcache. It can work with any SQL database.
Using npm:
$ npm install --save querymemcache
If you don't have or don't want to use npm:
$ cd ~/.node_modules
$ git clone git://github.com/bgrusnak/querymemcache.git
To require the library and initialize it
import QueryMemCache from 'querymemcache';
var cache=QueryMemCache({
lifetime: 300, // cache lifetime in seconds
servers: 'localhost:11211', // local server
options: {
maxKeySize: 2000 // the size of the key
}
})
There only one method
processCheck and cache the results of queryFunction
.process({observe:observedFields, change:changedFields}, queryFunction, callbackFunction)
Parameters:
| Name | Description | Type | Required |
|---|---|---|---|
| observe | List of field names or arrays [field, operand, value] which needs to be observed | Array | No |
| change | List of field names or arrays [field, operand, value] which will b changed | Array | No |
| queryFunction | The function, which will called if no valid data is available | Function | Yes |
| callbackFunction | The function, which will receive the result of the cache process | Function | No |
If you run into problems, have questions, or whatever else you can open an issue on this repository. If you'd like to submit a patch, shoot me a pull request. I'd like to keep this module simple, so if you want to add all kinds of crazy functionality - you might want to fork. When in doubt, send a pull request - the worst that can happen is that I won't merge it.
MIT © Ilya Shlyakhovoy
FAQs
Adding an unified SQL caching functionality with memcached.
We found that querymemcache 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.