Closed dwrBad closed 2 years ago
Hi @dwrBad thank you for the PR. Before I review this PR we need to wait for https://github.com/StarpTech/apollo-datasource-http/pull/26. Please update this branch after the merge.
Hi @StarpTech I adjusted the code to fix the behaviour with the changes from #26 and updated the branch. Thank you for looking into it!
+1 on this PR. LGTM.
This PR is related to https://github.com/StarpTech/apollo-datasource-http/issues/19
It makes POST requests cacheable. Default behavior will still be the same – only GET requests will be cached. But you may manually overwrite
isRequestCacheable()
to define a default behaviour. Additionaly you should/must overwriteonCacheKeyCalculation
to define an adequate caching key (including the body for example).