Is it possible to modify the expiration policy for the cache on Google's Volley lib? I believe you can implement your own cache, however is there an easy way to do this with the default implementation?
No need to write your own cache implementation. You can change method com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders(NetworkResponse response), ignore these headers, set entry.softTtl and entry.ttl fields to whatever value works for you and use your method in your request class.
There is an example in my answer to similar question - Android Volley + JSONObjectRequest Caching
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With