Ticket #15499: allow-cache-control-private-override.diff
File allow-cache-control-private-override.diff, 661 bytes (added by , 14 years ago) |
---|
-
django/utils/cache.py
67 67 if 'max-age' in cc and 'max_age' in kwargs: 68 68 kwargs['max_age'] = min(cc['max-age'], kwargs['max_age']) 69 69 70 # Allow overriding private caching and vice versa 71 if 'private' in cc and 'public' in kwargs: 72 del cc['private'] 73 elif 'public' in cc and 'private' in kwargs: 74 del cc['public'] 75 70 76 for (k, v) in kwargs.items(): 71 77 cc[k.replace('_', '-')] = v 72 78 cc = ', '.join([dictvalue(el) for el in cc.items()])