1 | diff -r django/django/utils/cache.py djangonew/django/utils/cache.py
|
---|
2 | 30c30
|
---|
3 | < def patch_cache_control(response, **kwargs):
|
---|
4 | ---
|
---|
5 | > def patch_cache_control(response, rewrite = True, **kwargs):
|
---|
6 | 34a35,37
|
---|
7 | > * If rewrite set to False, then value 'max-age' in current Cache-Control
|
---|
8 | > header remains untouched, otherwise it could be rewritten by value from
|
---|
9 | > kwargs
|
---|
10 | 59a63,66
|
---|
11 | >
|
---|
12 | > if not rewrite and 'max-age' in cc and 'max_age' in kwargs:
|
---|
13 | > del kwargs['max_age']
|
---|
14 | >
|
---|
15 | 87c94
|
---|
16 | < patch_cache_control(response, max_age=cache_timeout)
|
---|
17 | ---
|
---|
18 | > patch_cache_control(response, rewrite = False, max_age=cache_timeout)
|
---|
19 | Pouze v django: patch_cache_controll.diff
|
---|