GithubHelp home page GithubHelp logo

Robospice and ETag ? about robospice HOT 2 CLOSED

aat-antoine avatar aat-antoine commented on August 27, 2024
Robospice and ETag ?

from robospice.

Comments (2)

rciovati avatar rciovati commented on August 27, 2024

There shouldn't be any problem.
For instance, using Google Http Client (see this sample)

HttpRequest request = getHttpRequestFactory()//
                .buildGetRequest( new GenericUrl( baseUrl ) );
        HttpHeaders headers = new HttpHeaders();
        headers.setETag("your-value");
        request.setHeaders(headers);
        request.setParser( new JacksonFactory().createJsonObjectParser() );
        return request.execute().parseAs( getResultType() );

from robospice.

busylee999 avatar busylee999 commented on August 27, 2024

Sorry for off topic. I read doc of Robospice and I have puzzled. Consider I use robospice + retrofit + okhttp client. I read about robospice cache it is ok it will cache data using passed timeout value, but okhttp has it's own etag based cache, but before okhttp figures out where to get data from cache or from net, okhttp need to process request for getting response 200 or 304 (if etag is equal). But if there is hit in robospice cache any network processing will not be occured.

  1. If I will use robospice and okhttp client (using retrofit) there will be two cache? (mean robospice cache and okhttp cache if I specified last)
  2. Is I am right, if there is cache mishit in robospice cache but if etag is not changed okhttp cache will work this time? (if it will be persisted)

from robospice.

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.