New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

reliable-get

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reliable-get - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

CacheMiddleware.js

8

index.js

@@ -91,3 +91,6 @@ 'use strict';

if (err) { return next(err, {stale: oldCacheData}); }
if (err) {
var staleContent = oldCacheData ? {stale: oldCacheData} : undefined;
return next(err, staleContent);
}

@@ -113,4 +116,7 @@ // Honor fragment cache control headers in a simplistic way

} else {
new CircuitBreaker(options, config, eventHandler, pipeAndCacheContent, function(err, res) {
if (err) { return next(err); }
// Force no store
res.headers['cache-control'] = 'no-store';
next(null, {content: res.content, headers: res.headers});

@@ -117,0 +123,0 @@ });

2

lib/cache/RedisCache.js

@@ -25,3 +25,3 @@ 'use strict';

var redisClient = redis.createClient(redisConfig.port, redisConfig.host, redisConfig.options);
var redisClient = redis.createClient(redisConfig.port || null, redisConfig.host || null, redisConfig.options);

@@ -28,0 +28,0 @@ // Prevent error events bubbling up to v8 and taking the worker down if redis is unavailable

{
"name": "reliable-get",
"version": "0.1.0",
"version": "0.1.1",
"description": "A circuit breaker and cached wrapper for GET requests (enables reliable external service interaction).",

@@ -30,2 +30,3 @@ "main": "index.js",

"circuit-breaker-js": "0.0.1",
"connect-route": "^0.1.4",
"hogan.js": "^3.0.2",

@@ -32,0 +33,0 @@ "html-entities": "^1.1.1",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc