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

Cache an individual issue #6

Open
drusellers opened this issue May 3, 2016 · 2 comments
Open

Cache an individual issue #6

drusellers opened this issue May 3, 2016 · 2 comments

Comments

@drusellers
Copy link
Member

Questions

  • How long should an issue be cached before being evicted?
  • Should the cache return the same headers as github?
  • Are there any well known cache headers we should also return / manipulate?
@dahlbyk
Copy link
Member

dahlbyk commented May 3, 2016

How long should an issue be cached before being evicted?

Never? Unsure if there's a point to flat out eviction, unless it is requested that we purge our cache.

Should the cache return the same headers as github?

Pretty close. If we're serving from cache we won't have up-to-date data for some headers (rate limit), so those would be excluded.

Are there any well known cache headers we should also return / manipulate?

Date will be most important. If we have an ETag, we can return it, but we would only get that from a detail request (most often we get issue payloads from multi-issue queries.

@rauhryan
Copy link
Member

rauhryan commented May 3, 2016

Interesting questions

How long should an issue be cached before being evicted?

Issues are pretty volatile. So they should be dynamic and check the API with the last ETag

I think we could get a lot more juice with caching things that change less, like collaborators, labels, repo details

Should the cache return the same headers as github?

I don't think so, eerrr I don't really know the answer to that question.

Maybe we could just relay the same headers, let's talk more about it

Are there any well known cache headers we should also return / manipulate?

ETag is the one that is used to ask GitHub if things have changed

And Links is the one that we need to parse out for pagination and such

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

3 participants