github
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/datasette/pull/416#issuecomment-473717052 | https://api.github.com/repos/simonw/datasette/issues/416 | 473717052 | MDEyOklzc3VlQ29tbWVudDQ3MzcxNzA1Mg== | 9599 | 2019-03-17T21:32:24Z | 2019-03-17T21:33:16Z | OWNER | Since this feature is now controlled by a config setting, I'm inclined to make it also available via a URL parameter. If you hit this URL: /fixtures/table.json?_hash=1 We can redirect to: /fixtures-c2342/table.json In this way developers can opt-in to a hashed (and hence far-future cached) response on a per-query basis. This option won't be available against mutable databases though, which are coming in #419 This means that the `hash_urls:1` config basically has the effect of assuming `?_hash=1` on all URLs to mutable databases. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
421348146 | |
https://github.com/simonw/datasette/pull/416#issuecomment-473715254 | https://api.github.com/repos/simonw/datasette/issues/416 | 473715254 | MDEyOklzc3VlQ29tbWVudDQ3MzcxNTI1NA== | 9599 | 2019-03-17T21:11:37Z | 2019-03-17T21:11:37Z | OWNER | The code for this has got a bit tricky. I need to make a decision at some point as to if the current request is a hashed_url request (if it includes a DB hash in the URL which is the current correct hash). I then need to be able to use that fact to decide which default TTL value to apply when returning the response. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
421348146 | |
https://github.com/simonw/datasette/pull/416#issuecomment-473714545 | https://api.github.com/repos/simonw/datasette/issues/416 | 473714545 | MDEyOklzc3VlQ29tbWVudDQ3MzcxNDU0NQ== | 9599 | 2019-03-17T21:03:08Z | 2019-03-17T21:04:17Z | OWNER | I'm going to introduce a new config setting: `default_cache_ttl_hashed` - and set the default value for `default_cache_ttl` to 10s (to protect against dog-piling). | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
421348146 | |
https://github.com/simonw/datasette/pull/416#issuecomment-473310026 | https://api.github.com/repos/simonw/datasette/issues/416 | 473310026 | MDEyOklzc3VlQ29tbWVudDQ3MzMxMDAyNg== | 9599 | 2019-03-15T14:35:53Z | 2019-03-15T14:35:53Z | OWNER | See #418 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
421348146 | |
https://github.com/simonw/datasette/pull/416#issuecomment-473160702 | https://api.github.com/repos/simonw/datasette/issues/416 | 473160702 | MDEyOklzc3VlQ29tbWVudDQ3MzE2MDcwMg== | 9599 | 2019-03-15T05:08:13Z | 2019-03-15T05:08:13Z | OWNER | This also needs extensive tests to ensure that with the option turned on all of the redirects behave as they should. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
421348146 | |
https://github.com/simonw/datasette/pull/416#issuecomment-473159679 | https://api.github.com/repos/simonw/datasette/issues/416 | 473159679 | MDEyOklzc3VlQ29tbWVudDQ3MzE1OTY3OQ== | 9599 | 2019-03-15T05:01:27Z | 2019-03-15T05:01:27Z | OWNER | Also: if the option is False and the user visits a URL with a hash in it, should we redirect them? I'm inclined to say no: furthermore, I'd be OK continuing to serve a far-future cache header for that case. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
421348146 | |
https://github.com/simonw/datasette/pull/416#issuecomment-473156513 | https://api.github.com/repos/simonw/datasette/issues/416 | 473156513 | MDEyOklzc3VlQ29tbWVudDQ3MzE1NjUxMw== | 9599 | 2019-03-15T04:40:29Z | 2019-03-15T04:40:29Z | OWNER | Still TODO: need to figure out what to do about cache TTL. Defaulting to 365 days no longer makes sense without the hash_urls setting. Maybe drop that setting default to 0? Here's the setting: https://github.com/simonw/datasette/blob/9743e1d91b5f0a2b3c1c0bd6ffce8739341f43c4/datasette/app.py#L84-L86 And here's where it takes affect: https://github.com/simonw/datasette/blob/4462a5ab2817ac0d9ffe20dafbbf27c5c5b81466/datasette/views/base.py#L491-L501 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
421348146 | |
https://github.com/simonw/datasette/pull/416#issuecomment-473154643 | https://api.github.com/repos/simonw/datasette/issues/416 | 473154643 | MDEyOklzc3VlQ29tbWVudDQ3MzE1NDY0Mw== | 9599 | 2019-03-15T04:27:47Z | 2019-03-15T04:28:00Z | OWNER | Deployed a demo: https://datasette-optional-hash-demo.now.sh/ datasette publish now \ ../demo-databses/russian-ads.db \ ../demo-databses/polar-bears.db \ --branch=optional-hash \ -n datasette-optional-hash \ --alias datasette-optional-hash-demo \ --install=datasette-cluster-map \ --install=datasette-json-html | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
421348146 |