serverless-api-gateway-caching
Intro
A plugin for the serverless framework which helps with configuring caching for API Gateway endpoints.
Example
plugins:
- serverless-api-gateway-caching
custom:
apiGatewayCaching:
enabled: true
clusterSize: '0.5'
ttlInSeconds: 300
functions:
list-all-cats:
handler: rest_api/cats/get/handler.handle
role: listCatsRole
events:
- http:
path: /cats
method: get
caching:
enabled: false
get-cat-by-paw-id:
handler: rest_api/cat/get/handler.handle
events:
- http:
path: /cats/{pawId}
method: get
caching:
enabled: true
ttlInSeconds: 3600
cacheKeyParameters:
- name: request.path.pawId
required: true
- name: request.header.Accept-Language
required: false