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

handle computed artifact caching automatically #675

Merged
merged 1 commit into from
Sep 20, 2016
Merged

Conversation

brendankenny
Copy link
Member

@paulirish

noticed a small bug in the computed artifact caching in PushedRequests and thought I'd just make caching taken care of automatically while I was in there.

When implementing a computed artifact in the future you just override compute_() and return either a Promise or the computed artifact directly and the ComputedArtifact base class will handle caching the response (and subsequently responding from the cache).

@paulirish
Copy link
Member

Nice. Really like that the promise.resolve handling is sequestered away.

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

Successfully merging this pull request may close these issues.

2 participants