Skip to content

Bypass fetch network call if there's no new data to fetch #18

@iamgabrielma

Description

@iamgabrielma

I can save the [Stock]() fetched stock data in some sort of "persistent" object in the app, by the size of it I can just use UserDefaults and then make URLSession.shared.dataTask task to only execute if there's actually new data to fetch, for example by comparing the datetime from last fetch, if does not pass the check I can bypassing the network call and just output the previously saved object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions