pyGrowler / Growler

A micro web-framework using asyncio coroutines and chained middleware.
http://www.growler.rocks
Apache License 2.0
686 stars 29 forks source link

Implement ETag #5

Closed akubera closed 7 years ago

akubera commented 8 years ago

ETags are a core feature of web servers that users should expect to work out of the box. This should be a non-middleware feature baked into either Application or HTTPRequest classes, with the option to disable or swap implementations if the user so chooses.

nudzo commented 8 years ago

Get inspired: https://github.com/mholt/caddy/issues/191

akubera commented 8 years ago

Thanks for your suggestion, @nudzo. Do you think it's best to just integrate etags into the static middleware vs some other, more general, mechanism?

nudzo commented 8 years ago

Yes, one I mentioned above is for static content. Dynamic content best when generate ETags itself, cause it can do it the most effective way - based on version of doc, or hash generated on doc save, or similar. Otherwise you have to calculate some kind of hash on every response - performance impact.