Coder Social home page Coder Social logo

大神你好,看到你自动缓存请求的接口,好像是读取到了缓存之后还继续发起网络请求,一般的缓存不是先读取缓存,能读取到缓存显示缓存数据,没有缓存的话才会发起网络请求吗?你这是读取缓存显示,请求到新数据又重新刷新覆盖缓存数据吗?这点有点疑惑?还有缓存读取支持分页读取吗? about ppnetworkhelper HOT 3 OPEN

jkpang avatar jkpang commented on June 5, 2024
大神你好,看到你自动缓存请求的接口,好像是读取到了缓存之后还继续发起网络请求,一般的缓存不是先读取缓存,能读取到缓存显示缓存数据,没有缓存的话才会发起网络请求吗?你这是读取缓存显示,请求到新数据又重新刷新覆盖缓存数据吗?这点有点疑惑?还有缓存读取支持分页读取吗?

from ppnetworkhelper.

Comments (3)

WangGuibin avatar WangGuibin commented on June 5, 2024

我看了下源码,我觉得这只是一种可选的策略,比如首页缓存,全部做缓存的话,感觉内存会吃不消的,有时候网络慢,启动时加载很慢,第一次打开没办法,但是第二次打开时有了缓存,先加载缓存用户体验相对好一些,后面再覆盖之。

from ppnetworkhelper.

zhanglizhong1002 avatar zhanglizhong1002 commented on June 5, 2024

可以这样吗 ,我先读取缓存---》刷新界面,然后请求完之后再去覆盖缓存,再去刷新----》界面?
还是第二次进入的时候去读取上次的缓存显示呢?????

from ppnetworkhelper.

weipeng02 avatar weipeng02 commented on June 5, 2024

我感觉应该有分页缓存的,缓存数据的key是通过URL和param组合的。分页的话param肯定不同的。

from ppnetworkhelper.

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.