diff options
| author | Chris Rossi <chris@archimedeanco.com> | 2014-07-21 16:46:35 -0400 |
|---|---|---|
| committer | Chris Rossi <chris@archimedeanco.com> | 2014-07-21 16:46:35 -0400 |
| commit | 6596304446f8369dfbcf264d143fe85d75832dba (patch) | |
| tree | 786afd855d50a0e0a592f10420320781544b6a53 /docs/narr/assets.rst | |
| parent | aa96dda157d39c57c0d2fe8399db0b2175fa83d2 (diff) | |
| download | pyramid-6596304446f8369dfbcf264d143fe85d75832dba.tar.gz pyramid-6596304446f8369dfbcf264d143fe85d75832dba.tar.bz2 pyramid-6596304446f8369dfbcf264d143fe85d75832dba.zip | |
Add 'prevent_cachebuster' setting.
Diffstat (limited to 'docs/narr/assets.rst')
| -rw-r--r-- | docs/narr/assets.rst | 11 |
1 files changed, 10 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 |
