3 ms·
Oh wow, I wrote this way back near the start of the project. I've been planning to write an updated version, and maybe incorporate that into Datasette's officia
by simonw 5y ago
Oh wow, I wrote this way back near the start of the project. I've been planning to write an updated version, and maybe incorporate that into Datasette's official documentation.
Most of the ideas in there are still used by the core project, with the exception of one: the "Far-future cache expiration" item.
That's the thing where Datasette rewrites the URL to incorporate a hash of the database contents, then serves them up with far-future cache expiry headers.
It used to be default behaviour, but I changed that when Datasette started allowing plugins to make writes to databases in February 2020 https://simonwillison.net/2020/Feb/26/weeknotes-datasette-writes/ https://simonwillison.net/2020/Feb/26/weeknotes-datasette-wr...
A few weeks ago I removed the remains of that feature from core entirely, and instead made made it available in a Datasette plugin: https://datasette.io/plugins/datasette-hashed-urls https://datasette.io/plugins/datasette-hashed-urls
That 2018 blog entry also talks about " Bundling the data with the code" - I've since expanded that idea into something I call the "Baked Data" architectural pattern: https://simonwillison.net/2021/Jul/28/baked-data/ https://simonwillison.net/2021/Jul/28/baked-data/