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

serverless-api-gateway-caching

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-api-gateway-caching

A plugin for the serverless framework which helps with configuring caching for API Gateway endpoints.

  • 1.0.0-rc9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
27K
increased by7.41%
Maintainers
1
Weekly downloads
 
Created
Source

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:
  # Enable or disable caching globally
  apiGatewayCaching:
    enabled: true
    clusterSize: '0.5'
    ttlInSeconds: 300

functions:
  # Responses are not cached
  list-all-cats:
    handler: rest_api/cats/get/handler.handle
    role: listCatsRole
    events:
      - http:
          path: /cats
          method: get
          caching:
            enabled: false # default is false

  # Responses are cached based the 'pawId' path parameter and the 'Accept-Language' header
  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

FAQs

Package last updated on 07 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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