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

Implement Caching #288

Merged
merged 3 commits into from Dec 20, 2019
Merged

Implement Caching #288

merged 3 commits into from Dec 20, 2019

Conversation

bboure
Copy link
Collaborator

@bboure bboure commented Dec 13, 2019

Resolves #276

@bboure
Copy link
Collaborator Author

bboure commented Dec 13, 2019

@michaelrhoden Want to help testing this?

@bboure bboure mentioned this pull request Dec 13, 2019
@rakeshmenon
Copy link

@bboure - Is this tested or do you need any help?

I've created a PR to your branch (feature/caching) to fix the failing snapshots.

@bboure
Copy link
Collaborator Author

bboure commented Dec 17, 2019

@rakeshmenon I haven't tested this (yet).
Any help is appreciated :)

@rakeshmenon
Copy link

rakeshmenon commented Dec 17, 2019

@bboure I was not able to get it to work.

I tried using it by changing the package version to:
sid88in/serverless-appsync-plugin#feature/caching

I added the caching configuration in serverless.yml as follows -

Under appSync:

  caching:
      ttl: 60
      behavior: PER_RESOLVER_CACHING
      type: 'T2_SMALL'

Under each mapping template:

  caching:
      ttl: 30

It was an update stack operation - as the AppSync endpoint already exists. The update stack operation went through - but did not enable the caching options in the resolvers or change the global caching config.

Let me know what you need from my end to debug this issue.

@bboure
Copy link
Collaborator Author

bboure commented Dec 17, 2019

THank you @rakeshmenon for testing this.
Can you confirm that the plugin got updated correctly in your node_modules folder?

instead of changing your package.json, you can also try to use npm link or yarn link

@rakeshmenon
Copy link

rakeshmenon commented Dec 17, 2019

Yes - the plugin was updated in the node_modules directory.

Screenshot 2019-12-17 22 05 31

@bboure
Copy link
Collaborator Author

bboure commented Dec 17, 2019

Fixed some issues and this is almost working as expected.
I came across an issue when disabling cache on a resolver. It seems related to CloudFormation.
I opened an issue here

@rakeshmenon
Copy link

w00t! I'll test this out today. Hopefully the Cloudformation issue gets addressed soon :)

@rakeshmenon
Copy link

Have tested this PR - I faced the same issue. Caching at the resolver level is not clearing when I removed caching config.

Everything else works fine!

@bboure
Copy link
Collaborator Author

bboure commented Dec 20, 2019

Cfn bug has been confirmed by AWS. After testing this on us-east-2 where the bug has been fixed. All seems to be working s expected.
Will merge this soon

@bboure bboure merged commit dd10aa8 into master Dec 20, 2019
@bboure bboure deleted the feature/caching branch December 20, 2019 08:01
@rakeshmenon
Copy link

Hi @bboure - when will the new version of the plugin be published with this change included?

@bboure
Copy link
Collaborator Author

bboure commented Jan 7, 2020

@rakeshmenon the plan is to release soon.
I just want to make sure that there are no breaking changes

@bboure
Copy link
Collaborator Author

bboure commented Jan 9, 2020

@rakeshmenon This is now part of the v1.2.0 release. Enjoy!

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

Successfully merging this pull request may close these issues.

Appsync Resolver Caching
2 participants