Giter Site home page Giter Site logo

Add API cacheing about twitter HOT 4 CLOSED

sferik avatar sferik commented on August 22, 2024
Add API cacheing

from twitter.

Comments (4)

sferik avatar sferik commented on August 22, 2024

IMHO, this type of caching is best done at the application layer.

from twitter.

ehaselwanter avatar ehaselwanter commented on August 22, 2024

but this is the application layer. or do you mean I should integrate caching in the twitter library. that is what I don't want to do. as this is the api from my point of view

from twitter.

sferik avatar sferik commented on August 22, 2024

Until proven otherwise, I assume that everyone using this library has different tolerances for data freshness/staleness. If I took your suggestion and implemented APICache within the library, all responses would be cached for 10 minutes (since that is the policy of APICache). While this might be desirable for your application, someone who needs realtime responses would be unable to use this library anymore. So, IHMO, this library should not implement caching.

from twitter.

ehaselwanter avatar ehaselwanter commented on August 22, 2024

ah. now I get it. we are talking about different things. my point is, that at least the list_timeline response was not marshallable from APICache. And my question was if the response could be made marshallable. As you can see I can do a to_json and JSON.parse to use it with APICache. no need to have it in the api (but it would be great option, I guess).

and you are right. there are different tolerances ;-)

from twitter.

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.