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

Add Caching Strategy #36

Open
rwjblue opened this issue Jul 26, 2017 · 3 comments
Open

Add Caching Strategy #36

rwjblue opened this issue Jul 26, 2017 · 3 comments

Comments

@rwjblue
Copy link
Owner

rwjblue commented Jul 26, 2017

In some circumstances git-repo-info is invoked many times throughout the life of a process (e.g. in ember-cli apps where rebuilds are happening), but in most cases the .git info is completely unchanged.

We should add a caching strategy that uses very little I/O to determine if a new commit or tag has been made, and if not simply return the same value as the prior invocation.

@stefanpenner
Copy link

what sorta strategy did you have in mind? Just readdir of tags and see if they changed? Is that enough?

@rwjblue
Copy link
Owner Author

rwjblue commented Jul 26, 2017

@stefanpenner - Yeah, something like that (for tags) and a simple fs.statSync should be enough to see if a new commit has been made.

@stefanpenner
Copy link

its not clear that that would be sufficiently fast. I wonder if its worth the complexity cost, or if the calling library is more responsible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants