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

koa-cash

Package Overview
Dependencies
Maintainers
2
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 1.0.1 to 1.1.0

LICENSE

4

index.js

@@ -79,3 +79,3 @@

yield set(this.cashKey, obj)
yield set(this.cashKey, obj, this.cash.maxAge || options.maxAge || 0)
}

@@ -92,3 +92,3 @@

// tell the upstream middleware to cache this response
this.cash = true
this.cash = { maxAge: maxAge }
return false

@@ -95,0 +95,0 @@ }

{
"name": "koa-cash",
"description": "HTTP response caching for Koa",
"version": "1.0.1",
"version": "1.1.0",
"dependencies": {
"mz": "1",
"bytes": "1",
"bytes": "^2.1.0",
"compressible": "2",
"stream-to-array": "2",
"koa-is-json": "1"
"koa-is-json": "1",
"mz": "^2.0.0",
"stream-to-array": "2"
},
"devDependencies": {
"koa": "0",
"mocha": "1",
"istanbul": "0",
"koa": "1",
"lru-cache": "2",
"mocha": "^2.3.3",
"should": "4",
"supertest": "0",
"lru-cache": "2",
"istanbul-harmony": "0"
"supertest": "0"
},
"scripts": {
"test": "NODE_ENV=test mocha --harmony-generators --require should --reporter spec",
"test-cov": "NODE_ENV=test node --harmony-generators ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --require should",
"test-travis": "NODE_ENV=test node --harmony-generators ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- --require should"
"test": "NODE_ENV=test mocha --require should --reporter spec",
"test-cov": "NODE_ENV=test node ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --require should",
"test-travis": "NODE_ENV=test node ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- --require should"
},

@@ -25,0 +25,0 @@ "author": {

@@ -9,3 +9,2 @@ # Koa Cash

[![Downloads][downloads-image]][downloads-url]
[![Gittip][gittip-image]][gittip-url]

@@ -80,3 +79,3 @@ HTTP response caching for Koa.

```js
function set(key, value) {
function set(key, value, maxAge) {
return <yieldable>

@@ -86,2 +85,5 @@ }

Note: `maxAge` is set by `.cash={ maxAge }`.
If it's not set, then `maxAge` will be `0`, which you should then ignore.
#### Example

@@ -141,3 +143,1 @@

[downloads-url]: https://npmjs.org/package/koa-cash
[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
[gittip-url]: https://www.gittip.com/jonathanong/
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