summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChris Rossi <chris@archimedeanco.com>2014-07-21 16:46:35 -0400
committerChris Rossi <chris@archimedeanco.com>2014-07-21 16:46:35 -0400
commit6596304446f8369dfbcf264d143fe85d75832dba (patch)
tree786afd855d50a0e0a592f10420320781544b6a53 /docs
parentaa96dda157d39c57c0d2fe8399db0b2175fa83d2 (diff)
downloadpyramid-6596304446f8369dfbcf264d143fe85d75832dba.tar.gz
pyramid-6596304446f8369dfbcf264d143fe85d75832dba.tar.bz2
pyramid-6596304446f8369dfbcf264d143fe85d75832dba.zip
Add 'prevent_cachebuster' setting.
Diffstat (limited to 'docs')
-rw-r--r--docs/narr/assets.rst11
-rw-r--r--docs/narr/environment.rst20
2 files changed, 30 insertions, 1 deletions
diff --git a/docs/narr/assets.rst b/docs/narr/assets.rst
index 7987d03a6..fea3fae48 100644
--- a/docs/narr/assets.rst
+++ b/docs/narr/assets.rst
@@ -349,6 +349,15 @@ headers instructing clients to cache the asset for ten years, unless the
restarting your application, you may still generate URLs with a stale md5
checksum.
+Disabling the Cache Buster
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+It can be useful in some situations (e.g. development) to globally disable all
+configured cache busters without changing calls to
+:meth:`~pyramid.config.Configurator.add_static_view`. To do this set the
+``PYRAMID_PREVENT_CACHEBUSTER`` environment variable or the
+``pyramid.prevent_cachebuster`` configuration value to a true value.
+
Customizing the Cache Buster
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -387,7 +396,7 @@ checksums as asset tokens.
Many HTTP caching proxy implementations will fail to cache any URL which
has a query string. For this reason, you should probably prefer
- :class:`~pyramid.static.PathSegementCacheBuster` to
+ :class:`~pyramid.static.PathSegmentCacheBuster` to
:class:`~pyramid.static.QueryStringCacheBuster`.
In order to implement your own cache buster, you can write your own class from
diff --git a/docs/narr/environment.rst b/docs/narr/environment.rst
index 412635f08..7e2f19278 100644
--- a/docs/narr/environment.rst
+++ b/docs/narr/environment.rst
@@ -158,6 +158,26 @@ feature when this is true.
| | |
+---------------------------------+----------------------------------+
+Preventing Cache Busting
+------------------------
+
+Prevent the ``cachebuster`` static view configuration argument from having any
+effect globally in this process when this value is true. No cache buster will
+be configured or used when this is true.
+
+.. seealso::
+
+ See also :ref:`cache_busting`.
+
++---------------------------------+----------------------------------+
+| Environment Variable Name | Config File Setting Name |
++=================================+==================================+
+| ``PYRAMID_PREVENT_CACHEBUSTER`` | ``pyramid.prevent_cachebuster`` |
+| | or ``prevent_cachebuster`` |
+| | |
+| | |
++---------------------------------+----------------------------------+
+
Debugging All
-------------