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

Database hash should include current datasette version #286

Open
simonw opened this issue May 25, 2018 · 2 comments
Open

Database hash should include current datasette version #286

simonw opened this issue May 25, 2018 · 2 comments

Comments

@simonw
Copy link
Owner

simonw commented May 25, 2018

Right now deploying a new version of datasette doesn't invalidate existing URLs, so users may still see a cached copy of the old templates.

We can fix this by including the current datasette version in the input to the hash function (which currently just the database file contents).

@simonw
Copy link
Owner Author

simonw commented May 25, 2018

A few extra thoughts:

  • Some users may want to opt out of this. We could have --config version_in_hash:false
  • should this affect the filename for the downloadable copy of the SQLite database? Maybe that should stay as just the hash of the contents, but that's a fair bit more complex
  • What about users who stick with the same version of datasette but deploy changes to their custom templates - how can we help them cache bust? Maybe with --config cache_version:2

@simonw
Copy link
Owner Author

simonw commented May 25, 2018

This is also a great excuse to finally write up some detailed documentation on Datasette's caching strategy

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

1 participant