Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persist User/Repo Information #58

Open
JoshVarty opened this issue Dec 22, 2014 · 1 comment
Open

Persist User/Repo Information #58

JoshVarty opened this issue Dec 22, 2014 · 1 comment
Labels

Comments

@JoshVarty
Copy link
Contributor

GitHubInformationRetriever.GetRepoInformation() and .GitHubInformationRetriever.GetUserInformation() are called every time a user or repository is browsed. This creates a request to GitHub.

We should persist this information and load it ourselves. We're probably going to need a database or datastore for this, though.

@AmadeusW
Copy link
Member

The information is persisted as file on the hard drive:
./SB_Files/username/user.data
./SB_Files/username/repository/repo.data

Possible stale information is served immediately. At the same time, we are asynchronously fetching new information from github (user's avatar, website, repo's number of forks and stars) only if the file is out of date. Currently it's set to 2 hours in SourceBrowser.Site.Utilities.FileUtilities.FileIsFresh but we can tune it to once a day.

@JoshVarty JoshVarty added the bug label Jan 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants