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

Storing a files should happen only when appropriate origin HTTP headers are found #11

Closed
ironsmile opened this issue May 31, 2015 · 1 comment
Assignees
Milestone

Comments

@ironsmile
Copy link
Owner

At the moment nedomi stored everything read from the origin. This shouldn't be so. We should only store the cache when the storage says we can. For this to work we will have to make sure storing happens at the right time in the request handling logic. Maybe a request boolean variable (in the request context?) should be used to decide if storing is allowed.

I propose the following flow of the request:

  • init request handler
  • adding false to the variable "cachable"
  • ...some request logic...
  • reading the response headers from the origin
  • executing the output modules' functions for origin headers and possibly changing the "cachable" variable to true
  • only at this point a decision can be made if the origin response can be cached or not
@ironsmile
Copy link
Owner Author

Lets say that this is superseded by #46

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