MLH-Fellowship / FellowshipWrapup

A showcase of all your work done during the MLH Fellowship
MIT License
6 stars 0 forks source link

Add caching to json data #16

Closed gmelodie closed 4 years ago

gmelodie commented 4 years ago
  1. Checks if a user is already queried. If so, grab the data from it.
  2. Users are checked by looking at their directories on data/{username}. A new user directory is created if none is found.
  3. If a directory for a user is found but it's empty, remove the directory and do the query normally.

Related to #11 and #12.

Obs: main.go should be ran from directory root so that CheckUser can find the data/{username} directories.

IamCathal commented 4 years ago

Looks good so far. I suppose another small function (which would be part of the JSON response) would involve creating a folder to put the JSON data into but that can come next

gmelodie commented 4 years ago

@IamCathal sure will do that after this one is merged :)

gmelodie commented 4 years ago

Merged on 17eaf33. (github is taking forever to check for conflicts)