URLSession and the missing policy

Hi !

Usually you want to make your app behave better under poor network conditions but you also want it to fetch the latest data when available.  In terms of caching policy it would mean : “loadFromWebElseUseCache”

Unfortunately it does not exists.  What’s available is :

Some of them aren’t even implemented !  I solved the problem by using two different URLSession :

Hope you like it !



Leave a Reply

Your email address will not be published. Required fields are marked *