Skip to content

Rename property for RESTDataSource#6834

Merged
glasser merged 3 commits into
apollographql:mainfrom
smyrick:rename-rest-datasource-property
Aug 19, 2022
Merged

Rename property for RESTDataSource#6834
glasser merged 3 commits into
apollographql:mainfrom
smyrick:rename-rest-datasource-property

Conversation

@smyrick

@smyrick smyrick commented Aug 19, 2022

Copy link
Copy Markdown
Member

Rename property for RESTDataSource from requestCacheEnabled to memoizeGetRequests

From the initial PR, the name of the new property was a little confusing since there are actually two caches, but what is being cached is the response data in the end

Original PR #6650

@netlify

netlify Bot commented Aug 19, 2022

Copy link
Copy Markdown

Deploy Preview for apollo-server-docs canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 4671b57
🔍 Latest deploy log https://app.netlify.com/sites/apollo-server-docs/deploys/63001907a08cda0009d5955d

@codesandbox-ci

codesandbox-ci Bot commented Aug 19, 2022

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 4671b57:

Sandbox Source
Apollo Server Typescript Configuration
Apollo Server Configuration

@glasser glasser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert CHANGELOG and I'll merge.

Your previous PR was a great step in the right direction of actually explaining what RESTDataSource does in its doc page. I know @rkoron007 will be looking at that page soon and perhaps that can be an opportunity to add an overall explanation of the caching behavior and expected lifecycle on the page (the general concept of “create a RESTDataSource once per request; all GET requests are memoized inside the data source regardless of HTTP cache control headers in the response; also the shared cache is used to cache anything with HTTP cache control headers in a way that honors the headers”). That the page doesn't mention anywhere that each RDS object is per request is pretty silly.

Comment thread CHANGELOG.md Outdated
@glasser glasser merged commit 8cc8437 into apollographql:main Aug 19, 2022
@smyrick smyrick deleted the rename-rest-datasource-property branch August 22, 2022 19:19
trevor-scheer pushed a commit to apollographql/datasource-rest that referenced this pull request Aug 22, 2022
Rename property for RESTDataSource from requestCacheEnabled to memoizeGetRequests

From the initial PR, the name of the new property was a little confusing since there are actually 
two caches, but what is being cached is the response data in the end.

Original PR #3
Back-port of apollographql/apollo-server#6834
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants