Giter Site home page Giter Site logo

Comments (7)

yale8848 avatar yale8848 commented on August 25, 2024 2

嗯 你说的有道理,下个版本把这两个功能分离开

from retrofitcache.

yale8848 avatar yale8848 commented on August 25, 2024 1

1.1.1 已经更新,你可以试试,clientBuilder.addInterceptor(new MockInterceptor());

from retrofitcache.

yale8848 avatar yale8848 commented on August 25, 2024

目前mock功能在CacheForceInterceptorNoNet逻辑里,你可以不用 @Cache注解,只用@mock注解就行了。

from retrofitcache.

protectedMan avatar protectedMan commented on August 25, 2024

但是我如果配置这一行的话CacheForceInterceptorNoNet,断网时就会强制走缓存了啊,即使我没有配置cache。

from retrofitcache.

yale8848 avatar yale8848 commented on August 25, 2024

配置一下试试@Cache(forceCacheNoNet = false)

from retrofitcache.

protectedMan avatar protectedMan commented on August 25, 2024

这个确实可以禁止缓存,那我所有接口都不需要配置缓存就要把WebService里面所有接口都需要加上这个注解了。
针对这个项目,我觉得,把接口模拟功能和缓存功能分离开来比较合适。

from retrofitcache.

protectedMan avatar protectedMan commented on August 25, 2024

等一个新版本
image

from retrofitcache.

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.