mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
default_cache_ttl_hashed config and ?_hash= param
This commit is contained in:
parent
fe9765962b
commit
8f003d9545
7 changed files with 72 additions and 21 deletions
|
|
@ -115,11 +115,21 @@ Enable/disable the ability for users to run custom SQL directly against a databa
|
|||
default_cache_ttl
|
||||
-----------------
|
||||
|
||||
Default HTTP caching max-age header in seconds, used for ``Cache-Control: max-age=X``. Can be over-ridden on a per-request basis using the ``?_ttl=`` querystring parameter. Set this to ``0`` to disable HTTP caching entirely. Defaults to 365 days (31536000 seconds).
|
||||
Default HTTP caching max-age header in seconds, used for ``Cache-Control: max-age=X``. Can be over-ridden on a per-request basis using the ``?_ttl=`` querystring parameter. Set this to ``0`` to disable HTTP caching entirely. Defaults to 5 seconds.
|
||||
|
||||
::
|
||||
|
||||
datasette mydatabase.db --config default_cache_ttl:10
|
||||
datasette mydatabase.db --config default_cache_ttl:60
|
||||
|
||||
default_cache_ttl_hashed
|
||||
------------------------
|
||||
|
||||
Default HTTP caching max-age for responses served using using the :ref:`hashed-urls mechanism <config_hash_urls>`. Defaults to 365 days (31536000 seconds).
|
||||
|
||||
::
|
||||
|
||||
datasette mydatabase.db --config default_cache_ttl_hashed:10000
|
||||
|
||||
|
||||
cache_size_kb
|
||||
-------------
|
||||
|
|
@ -180,6 +190,8 @@ HTTP but is served to the outside world via a proxy that enables HTTPS.
|
|||
|
||||
datasette mydatabase.db --config force_https_urls:1
|
||||
|
||||
.. _config_hash_urls:
|
||||
|
||||
hash_urls
|
||||
---------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue