I want to give offline support in my app and I used volley library to parse data from jsonobject
. I have learned that volley itself has a fine cache mechanism. I have implemented this code to get data from cache
Cache cache = GlobalData.getInstance().getRequestQueue().getCache();
Cache.Entry entry = cache.get(Constants.URL_WEATHER_REQUEST + city);
but the entry always returns null. I have heard about the headers of the server site and I have tested it using restClient addonn in mozilla which looks like this:
I dont know where is the problem but I always get cache entry null and If I turn the internet on volley parses it as usual. What should I do now?