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

HTTP Caching is broken on webcompat.com #590

Closed
karlcow opened this issue Mar 10, 2015 · 6 comments
Closed

HTTP Caching is broken on webcompat.com #590

karlcow opened this issue Mar 10, 2015 · 6 comments

Comments

@karlcow
Copy link
Member

karlcow commented Mar 10, 2015

We must have made a modification at a point which has broken our cache. We need to figure it out :)
So far just a preview. I tried to navigate a bit more and I get only "200" except for github and google which are sending the right things for their own parts independent of webcompat.

issues-cache

Let's try with 773

  • html /issues/773 No Etag sent by the server, no caching information.
    So the second time we hit it it does the same thing again.

Hmm… I wonder if we butchered all of that when we decided to put under https?

@miketaylr
Copy link
Member

Yep, only CSS is cached on re-loads for me. That's busted.

screen shot 2015-03-10 at 09 55 28

@miketaylr
Copy link
Member

OK, so that's not necessarily true. Re-testing again I get 304s except for 779.json. We should be able to fix that.

39als3nck3-3000x3000

@miketaylr
Copy link
Member

It looks like the source of the bug is we only do conditional GET for logged in users. If I log in, I get a 304 on 779.json on the 2nd time.

So the fix would be to incorporate get_request_headers into proxy_request.

@miketaylr
Copy link
Member

OK in theory that's supposed to be happening here: https://github.com/webcompat/webcompat.com/blob/master/webcompat/issues.py#L31

@miketaylr
Copy link
Member

Ah, I think I see the bug. headers is not the headers we think it is. :)

miketaylr pushed a commit that referenced this issue Apr 10, 2015
Which will be merged with the AUTH_HEADERS and sent to github.
miketaylr pushed a commit that referenced this issue Apr 10, 2015
This allows us to send conditional GET requests based on eTag
in the case of un-authed requests.
@karlcow
Copy link
Member Author

karlcow commented Apr 13, 2015

@miketaylr did a good job for the JSON part. We need to fix the caching story for HTML too.
I have opened #609

@karlcow karlcow added this to the HTTP Caching milestone Feb 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants