OkHttpUtils2 never caches anything.
But it uses the browser engine, doesn't it?
you didn't say whether you were experiencing the same problem with okhttputils2. are you?
or were you simply asking out of curiosity?
Yes, and that's why I'm asking, Let me give an example :
In the user database in MYSQL, there is a column for 'authenticated', and users must be authenticated to log in, and the program reads the result of the request from PHP when logging in, if it is 1, it will allow the user to log in, if it is 0 It asks the user to contact the administration to confirm his/her account ; On the other hand, in the admin program, the list of unapproved users is displayed for approval or rejection, and the administrator can reject or approve users.
The problem that occurs is that if the verified user wants to enter his account immediately (up to 5 minutes) after being verified by the admin, he will receive the previous value (0).
A strange thing that I came across during unit testing, if I hard refresh the same PHP page in a computer browser, for example Firefox, the information is updated both in the browser and in the program that uses OkHttpUtils to get the information!
Now, if after the user's approval, the PHP file is opened with a browser like Edge that has never opened that PHP file before, it will display the new value (1) without any problem, but OkHttpUtils will still display the previous value!
This problem can be seen in various sections that need to be updated quickly, such as the list of offers and news.
(eg,"Cache-Control: no-cache")
I would be grateful if you could give an example of this.
Because I tried using Headers(Found some examples in community) and Accept_All (it was a shot in the dark, I know) in OkHttpUtils and the result is the same both in Release and Debug mode.