Closed dev-ritik closed 5 years ago
Can you explain this issue briefly? Do you want the contests to be stored in the database, and if the fetchcontests() function is called within an hour since last call, contests will be displayed from the database? Also, what do you mean by local database? @dev-ritik
Yes exactly. Sorry local server database. Later, we will extend this to submissions API as well.
Modify https://github.com/mdg-iitr/Codephile/blob/6dbb4e9f30e45adda65d2762685e55001ffa801d/models/contest.go#L81 to reduce the network calls to the API and use local DB to serve some requests based on some time field. Let's add a time difference of 1 hr for API calls