Coder Social home page Coder Social logo

Comments (7)

StarpTech avatar StarpTech commented on June 9, 2024

Do you want to cache POST requests? We can introduce a request option enforceCache? Would you like to create a PR? Don't forget to add tests.

from apollo-datasource-http.

mjhost avatar mjhost commented on June 9, 2024

you already have this overridable method

protected isResponseCacheable<TResult = unknown>(
request: Request,
response: Response<TResult>,
): boolean {
return statusCodeCacheableByDefault.has(response.statusCode) && request.method === 'GET'
}

that may be used in some way? what do you think?

from apollo-datasource-http.

mjhost avatar mjhost commented on June 9, 2024

I'm not sure if I have the time for a PR soon, but I might be

from apollo-datasource-http.

StarpTech avatar StarpTech commented on June 9, 2024

you already have this overridable method

This is about the response cache not if the request should be memorized. At this point, we have no response.

from apollo-datasource-http.

mjhost avatar mjhost commented on June 9, 2024

yes, i was implying something with the same approach

protected isRequestCacheable<TResult = unknown>(request: Request): boolean

from apollo-datasource-http.

StarpTech avatar StarpTech commented on June 9, 2024

Closing due to inactivity. Feel free to reopen.

from apollo-datasource-http.

dwrBad avatar dwrBad commented on June 9, 2024

Hi there, I would like to reopen this one, appending a PR #24
Feel free to change or comment on that.

Thank you

from apollo-datasource-http.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.