Code Monkey home page Code Monkey logo

Comments (5)

swankjesse avatar swankjesse commented on July 20, 2024

Can you use the cache's statistics reporting?

from httpresponsecache.

tprochazka avatar tprochazka commented on July 20, 2024

I don't think so. Only that I will remember cache hit counter before request and compare it with state after request, if it will be incremented data are from cache, but I don't know if it is thread save, it would require same external synchronization which completely disallow parallel downloading :-(

from httpresponsecache.

orrc avatar orrc commented on July 20, 2024

What's the issue with "local time precision"?

I'm sure Android's clock resolution is very high (i.e. better than 1 millisecond), or if you mean that the user (or network) can change the value of System.currentTimeMillis() at any point, then in any case you should be using Android's SystemClock.uptimeMillis().

from httpresponsecache.

tprochazka avatar tprochazka commented on July 20, 2024

I mean that user can have turned off automatic time synchronization and can have wrong system time. And my only solution that I found is compare current system time with time-stamp X-Android-Received-Millis. I can't use SystemClock.uptimeMillis() because it is counted from system start and I can't compare it with unix timestamp. Much better would be if cache will add some flag that data are from cache. But it will work only this library, not in original android implementation :-(

from httpresponsecache.

swankjesse avatar swankjesse commented on July 20, 2024

Craig and I are working hard to keep this version and the android version in sync! But the Android 4.0 code is complete and we can't add any new behavior there.

from httpresponsecache.

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.