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

Async Http Cache Proxy #304

Closed
johanjanssens opened this issue Apr 2, 2020 · 0 comments
Closed

Async Http Cache Proxy #304

johanjanssens opened this issue Apr 2, 2020 · 0 comments
Assignees
Labels
Milestone

Comments

@johanjanssens
Copy link
Member

Refactor the http cache proxy to work async. Using an async proxy ensures that each request will be equally fast as the cache will be validated or regenerated in the background.

@johanjanssens johanjanssens added this to the 0.18.0 milestone Apr 2, 2020
@johanjanssens johanjanssens self-assigned this Apr 2, 2020
johanjanssens added a commit that referenced this issue Apr 2, 2020
- Turn off output_buffering and output_compression
- Pass in a callback to execute the application
- Do not handle cache expiration
- Only validate cache based on etag, remove support for last-modified
- Use  fastcgi_finish_request(); to flush all response data to the client
- Remove use of  PROXY-REFRESHED and PROXY-HIT status codes
johanjanssens added a commit that referenced this issue Apr 2, 2020
- Store refreshed cache and calculate Age if needed
- Do not set Last-Modified header only use Etag validation
- Implement cache as an action to allow event listeners to intercept it
johanjanssens added a commit that referenced this issue Apr 2, 2020
This allows the code to work with the async http cache proxy. Without it
a exception will be thrown that headers have already been send.
johanjanssens added a commit that referenced this issue Apr 6, 2020
Rename isCached() to loadCache() and return the cache as an array
johanjanssens added a commit that referenced this issue Apr 7, 2020
johanjanssens added a commit that referenced this issue May 9, 2020
- Generate a Warning: 110 Joomlatools/Pages "Response is Stale" header if the response is stale.
- Calcule the correct Age
- Force set the Cache-Status to HIT
johanjanssens added a commit that referenced this issue May 9, 2020
johanjanssens added a commit that referenced this issue May 10, 2020
Generating a 304 response MUST generate any of the following header
fields that would have been sentin a 200 (OK) response to the same
request: Cache-Control, Content-Location, Date, ETag and Vary

Ensure the Date header is refreshed upon validation of a request
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

1 participant