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

cacheable-response

Package Overview
Dependencies
Maintainers
1
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cacheable-response - npm Package Compare versions

Comparing version

to
1.7.0

14

CHANGELOG.md

@@ -5,2 +5,16 @@ # Changelog

## [1.7.0](https://github.com/Kikobeats/cacheable-response/compare/v1.6.12...v1.7.0) (2019-09-11)
### Build System
* update dependencies ([5c502e6](https://github.com/Kikobeats/cacheable-response/commit/5c502e6))
### Features
* add response to getKey attributes ([da25929](https://github.com/Kikobeats/cacheable-response/commit/da25929))
### [1.6.12](https://github.com/Kikobeats/cacheable-response/compare/v1.6.11...v1.6.12) (2019-06-26)

@@ -7,0 +21,0 @@

2

index.js

@@ -87,3 +87,3 @@ 'use strict'

)
const key = getKey(req)
const key = getKey(req, res)
const cachedResult = await decompress(await cache.get(key))

@@ -90,0 +90,0 @@ const isHit = !hasForce && cachedResult !== undefined

@@ -5,3 +5,3 @@ {

"homepage": "https://nicedoc.io/Kikobeats/cacheable-response",
"version": "1.6.12",
"version": "1.7.0",
"main": "index.js",

@@ -13,2 +13,8 @@ "author": {

},
"contributors": [
{
"name": "whooehoo",
"email": "whooehoo@yandex.ru"
}
],
"repository": {

@@ -33,4 +39,4 @@ "type": "git",

"dependencies": {
"compress-brotli": "~1.0.5",
"debug-logfmt": "~1.0.2",
"compress-brotli": "~1.0.7",
"debug-logfmt": "~1.0.3",
"etag": "~1.8.1",

@@ -37,0 +43,0 @@ "keyv": "~3.1.0",

@@ -188,5 +188,5 @@ # cacheable-response

Type: `function`<br/>
Default: `req => normalizeUrl(req.url)`
Default: `(req, res) => normalizeUrl(req.url)`
It determinates how the cache key should be computed using `req` as input.
It determinates how the cache key should be computed, receiving `req, res` as input.

@@ -193,0 +193,0 @@ ##### get