Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koa-cash

Package Overview
Dependencies
Maintainers
5
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-cash - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

8

index.js

@@ -20,3 +20,3 @@ const { gzip } = require('zlib');

module.exports = function(options) {
options = options || { compression: false };
options = options || {};

@@ -124,7 +124,3 @@ const hash =

if (
options.compression &&
compressible(obj.type) &&
ctx.response.length >= threshold
) {
if (compressible(obj.type) && ctx.response.length >= threshold) {
obj.gzip = await compress(body);

@@ -131,0 +127,0 @@ if (

{
"name": "koa-cash",
"description": "HTTP response caching for Koa. HTTP response caching for Koa. Supports Redis, in-memory store, and more!",
"version": "4.0.0",
"version": "4.0.1",
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",

@@ -6,0 +6,0 @@ "ava": {

@@ -33,3 +33,3 @@ # koa-cash

* Handles JSON and stream bodies
* Handles gzip compression negotiation (if `options.compression` is set to `true` as of v4.0.0)
* Handles gzip compression negotiation
* Handles 304 responses

@@ -90,6 +90,2 @@

#### `compression`
If a truthy value is passed, then compression will be enabled. This value is `false` by default.
#### `hash()`

@@ -96,0 +92,0 @@

@@ -19,4 +19,3 @@ const Koa = require('koa');

return c.set(key, value);
},
compression: true
}
}

@@ -40,4 +39,3 @@ )

return c.set(key, value);
},
compression: true
}
});

@@ -176,4 +174,3 @@

return c.set(key, JSON.stringify(value));
},
compression: true
}
});

@@ -180,0 +177,0 @@ app.use(async function(ctx) {

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