summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Rossi <chris@archimedeanco.com>2014-07-15 10:57:36 -0400
committerChris Rossi <chris@archimedeanco.com>2014-07-15 10:57:36 -0400
commitde2996ddcc7c2ac5c3e59101df0fed1ab832701b (patch)
treed0169a559f02ccc87a22f907bc15509109f8c374
parent9af33504d9d621bc0f87752837a09f9110e454e5 (diff)
downloadpyramid-de2996ddcc7c2ac5c3e59101df0fed1ab832701b.tar.gz
pyramid-de2996ddcc7c2ac5c3e59101df0fed1ab832701b.tar.bz2
pyramid-de2996ddcc7c2ac5c3e59101df0fed1ab832701b.zip
Make sure it's possible to still set cache_max_age to None even if cache busting is being used.
-rw-r--r--pyramid/config/views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pyramid/config/views.py b/pyramid/config/views.py
index c09ddc73d..b583b59a0 100644
--- a/pyramid/config/views.py
+++ b/pyramid/config/views.py
@@ -1975,9 +1975,9 @@ class StaticURLInfo(object):
else:
# it's a view name
url = None
- cache_max_age = extra.pop('cache_max_age', None)
- if cache_max_age is None and cb:
- cache_max_age = 10 * 365 * 24 * 60 * 60 # Ten(ish) years
+ ten_years = 10 * 365 * 24 * 60 * 60 # more or less
+ default = ten_years if cb else None
+ cache_max_age = extra.pop('cache_max_age', default)
# create a view
view = static_view(spec, cache_max_age=cache_max_age,