A request with no hints as to whether it should be cached. Yet, we might still choose to cache it via a heuristic.
(self, env, start_response)
| 24 | return None |
| 25 | |
| 26 | def optional_cacheable_request(self, env, start_response): |
| 27 | """A request with no hints as to whether it should be |
| 28 | cached. Yet, we might still choose to cache it via a |
| 29 | heuristic.""" |
| 30 | |
| 31 | headers = [ |
| 32 | ("server", "nginx/1.2.6 (Ubuntu)"), |
| 33 | ("last-modified", "Mon, 21 Jul 2014 17:45:39 GMT"), |
| 34 | ("content-type", "text/html"), |
| 35 | ] |
| 36 | |
| 37 | start_response("200 OK", headers) |
| 38 | return [pformat(env).encode("utf8")] |
| 39 | |
| 40 | def vary_accept(self, env, start_response): |
| 41 | response = pformat(env).encode("utf8") |