Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clusterSize is ignored. #61

Closed
angelcervera opened this issue Sep 27, 2019 · 4 comments
Closed

clusterSize is ignored. #61

angelcervera opened this issue Sep 27, 2019 · 4 comments

Comments

@angelcervera
Copy link
Contributor

angelcervera commented Sep 27, 2019

This is the config that I'm using:

      caching:
        enabled: true
        clusterSize: '13.5'
        ttlInSeconds: 3600
        cacheKeyParameters:
          - name: request.path.param1
          - name: request.querystring.param2

As result, the cache is enable correctly but the cache capacity is 0.5 instead 13.5

sls -v
1.42.3
node --version
v9.11.2

serverless-api-gateway-caching: 1.4.0

https://stackoverflow.com/questions/58137023/serverless-api-gateway-caching-plugin-is-not-setting-the-cache-size

@DianaIonita
Copy link
Owner

Hi @angelcervera,

You can set the clusterSize on the whole instance under global settings:

custom:
  apiGatewayCaching:
    enabled: true
    clusterSize: '13.5'

You can't define it for each function, because there's only one cache cluster for all functions associated with this Rest API.

@angelcervera
Copy link
Contributor Author

I'll check it tomorrow. Pretty sure this is the reason. In that case, I will update the documentation and I will create a PR. ok?

@DianaIonita
Copy link
Owner

I think the documentation is accurate, but I'm curious how you'd like to improve it. Feel free to raise a PR, if you wish.

@angelcervera
Copy link
Contributor Author

angelcervera commented Oct 1, 2019

The proposal in the PR. #62

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants