serverless-api-gateway-caching
Advanced tools
Comparing version 1.5.0 to 1.5.1
{ | ||
"name": "serverless-api-gateway-caching", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "A plugin for the serverless framework which helps with configuring caching for API Gateway endpoints.", | ||
@@ -5,0 +5,0 @@ "main": "src/apiGatewayCachingPlugin.js", |
@@ -205,5 +205,5 @@ # serverless-api-gateway-caching | ||
API Gateway will create cache entries like this: | ||
- `GET /cats/davy/` will create a cache entry for `proxy=davy` | ||
- `GET /cats/london/battersea/pink` will create an entry for `proxy=london/battersea/pink` | ||
- `GET /cats/london/battersea/pink?type=animals` will only create an entry for `proxy=london/battersea/pink`, ignoring the query string. | ||
- `GET /cats/toby/` will create a cache entry for `proxy=toby` | ||
- `GET /cats/in/london` will create an entry for `proxy=in/london` | ||
- `GET /cats/in/london?named=toby` will only create an entry for `proxy=in/london`, ignoring the query string. Note, however, that you can also add the `named` query string parameter as a cache key parameter and it will cache based on that value as well. | ||
@@ -210,0 +210,0 @@ |
@@ -57,2 +57,6 @@ const get = require('lodash.get'); | ||
if (this.path.endsWith('/') && this.path.length > 1) { | ||
this.path = this.path.slice(0, -1); | ||
} | ||
if (!event.http.caching) { | ||
@@ -59,0 +63,0 @@ this.cachingEnabled = false; |
31464
460