Elyas Beshkani
- Forum posts: 1
Jan 8, 2019, 8:24:21 AM via Website
Jan 8, 2019 8:24:21 AM via Website
Hello
sorry for my bad English!
this is my code for getting information
But information is cached
When I add a data to the database, the data will be added but will not be displayed
As long as I was on the localhost, it worked fine, but when uploaded to the host, the data cached
What can I do?
Thank you for helping me!
Another interesting point is that when I turn on vpn, data does not cache and the new data quickly displayed!
what should I do?
I got confused
StringRequest request = new StringRequest(Request.Method.POST, url, listener, errorListener) {
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String, String> map = new HashMap<>();
map.put("year", year);
map.put("month", month);
return map;
}
};
request.setShouldCache(false);
RequestQueue queue = Volley.newRequestQueue(MainActivity.this);
queue.getCache().clear();
queue.add(request);
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.