serverless-api-gateway-caching
serverless-api-gateway-caching copied to clipboard
TTL configs not applied by Api Gateway
Using the following global config:
apiGatewayCaching: enabled: true clusterSize: '0.5' ttlinseconds: 300
And the folllowing function config:
caching:
enabled: true
ttlinseconds: 300
perkeyinvalidation:
requireAuthorization: false
Both the API gateway stage and the specific method/function are defaulting to a TTL of 3600 seconds.
Any ideas / suggestions?
Hi @branst,
Thanks for raising this issue. There are a couple of things you could try.
- Make sure the plugin is correctly referenced in your
package.json
and that it's referencing the latest version:[email protected]
. - I'm unsure from your pasted code whether yaml indentation is correct, so you could try disabling caching for your stage, then for your endpoint and seeing if that is reflected in API gateway. If not, then plugin configuration may be incorrect.
Please let me know how that goes.