Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
hapi-redis-output-cache
Advanced tools
Redis-backed output cache plugin for Hapi
$ npm i hapi-redis-output-cache --save
var server = new (require('hapi').Server)();
server.connection({ port: 3000 });
server.register([
{
register: require('hapi-redis-output-cache'),
options: {
host: '127.0.0.1',
staleIn: 30,
expiresIn: 60
}
}
], function (err) {
if (err) {
console.error('Failed to load plugin:', err);
}
server.start();
});
function(req, reply){ ... }
invoked on each cache write; useful for responding to cache miss eventsBy default, output caching is disabled. To enable it for a specific route, set isCacheable: true
in the route settings:
server.route({
method: 'GET',
path: '/',
handler: function (request, reply) {
return reply('hello world');
},
config: {
plugins: {
'hapi-redis-output-cache': {
isCacheable: true
}
}
}
});
Output cache metadata is injected into each request and can be access via req.outputCache
:
FAQs
Redis-backed output cache plugin for Hapi
We found that hapi-redis-output-cache demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.