summaryrefslogtreecommitdiff
path: root/django/utils/cache.py
Commit message (Collapse)AuthorAgeFilesLines
* Refs #33476 -- Applied Black's 2023 stable style.David Smith2023-02-011-1/+1
| | | | | | | | Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0
* Fixed #34233 -- Dropped support for Python 3.8 and 3.9.Mariusz Felisiak2023-01-181-1/+1
|
* Updated documentation and comments for RFC updates.Nick Pope2022-11-101-10/+11
| | | | | | | | | | | | | | | - Updated references to RFC 1123 to RFC 5322 - Only partial as RFC 5322 sort of sub-references RFC 1123. - Updated references to RFC 2388 to RFC 7578 - Except RFC 2388 Section 5.3 which has no equivalent. - Updated references to RFC 2396 to RFC 3986 - Updated references to RFC 2616 to RFC 9110 - Updated references to RFC 3066 to RFC 5646 - Updated references to RFC 7230 to RFC 9112 - Updated references to RFC 7231 to RFC 9110 - Updated references to RFC 7232 to RFC 9110 - Updated references to RFC 7234 to RFC 9111 - Tidied up style of text when referring to RFC documents
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-071-69/+95
|
* Fixed #28401 -- Allowed hashlib.md5() calls to work with FIPS kernels.Ade Lee2021-10-121-5/+7
| | | | | | | | | | | | | | | | | | | md5 is not an approved algorithm in FIPS mode, and trying to instantiate a hashlib.md5() will fail when the system is running in FIPS mode. md5 is allowed when in a non-security context. There is a plan to add a keyword parameter (usedforsecurity) to hashlib.md5() to annotate whether or not the instance is being used in a security context. In the case where it is not, the instantiation of md5 will be allowed. See https://bugs.python.org/issue9216 for more details. Some downstream python versions already support this parameter. To support these versions, a new encapsulation of md5() has been added. This encapsulation will pass through the usedforsecurity parameter in the case where the parameter is supported, and strip it if it is not. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Made small readability improvements.Martin Thoma2020-10-281-4/+7
|
* Removed unneeded calls to iri_to_uri() in cache key generation.Florian Apolloner2020-10-061-3/+2
| | | | request.build_absolute_uri() already applies iri_to_uri()
* Fixed #31789 -- Added a new headers interface to HttpResponse.Tom Carrick2020-09-141-11/+11
|
* Refs #5691 -- Made cache keys independent of USE_L10N.Claude Paroz2020-06-221-6/+6
| | | | This mostly reverts af1893c4ff8fdbf227a43a559d90bb1c1238b01a.
* Fixed #30899 -- Lazily compiled import time regular expressions.Hasan Ramezani2019-10-291-2/+2
|
* Fixed #23755 -- Added support for multiple field names in the no-cache ↵Flavio Curella2019-10-101-7/+27
| | | | | | Cache-Control directive to patch_cache_control(). https://tools.ietf.org/html/rfc7234#section-5.2.2.2
* Fixed #30812 -- Made ConditionalGetMiddleware set ETag only for responses ↵Viktor Lomakin2019-10-101-1/+1
| | | | with non-empty content.
* Fixed #30701 -- Updated patch_vary_headers() to handle an asterisk according ↵Adnan Umer2019-08-161-3/+8
| | | | to RFC 7231.
* Fixed #30594 -- Added 'private' Cache-Control directive to never_cache() ↵nsasaki1282019-06-261-1/+1
| | | | decorator.
* Refs #27795 -- Removed force_bytes() usage in django/utils/cache.py.Jon Dufresne2018-08-281-4/+4
|
* Fixed #26688 -- Fixed HTTP request logging inconsistencies.Samir Shah2018-05-041-9/+6
| | | | | * Added logging of 500 responses for instantiated responses. * Added logging of all 4xx and 5xx responses.
* Refs #17476 -- Removed obsolete simplification of timezone names in cache ↵Sergey Fedoseev2018-03-031-7/+2
| | | | key generation.
* Fixed #28996 -- Simplified some boolean constructs and removed trivial ↵Дилян Палаузов2018-01-121-3/+2
| | | | continue statements.
* Fixed #28982 -- Simplified code with and/or.Дилян Палаузов2018-01-031-4/+2
|
* Simplified django.utils.cache.get_max_age().Jozef2017-12-041-5/+4
|
* Refs #26447 -- Removed the USE_ETAGS setting per deprecation timeline.Tim Graham2017-09-221-14/+0
|
* Removed unnecessary parens in various code.Mariusz Felisiak2017-09-131-2/+2
|
* Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.Jon Dufresne2017-06-011-2/+2
|
* Refs #27656 -- Updated django.utils docstring verbs according to PEP 257.Anton Samarchyan2017-02-111-15/+15
|
* Refs #23919 -- Removed encoding preambles and future importsClaude Paroz2017-01-181-2/+0
|
* Fixed #19705 -- Set proper headers on conditional Not Modified responses.Kevin Christopher Henry2016-10-121-7/+14
|
* Fixed #26447 -- Deprecated settings.USE_ETAGS in favor of ↵Denis Cornehl2016-10-101-0/+9
| | | | ConditionalGetMiddleware.
* Fixed #27226 -- Removed patch_response_headers()'s setting of the ↵Rinat Khabibiev2016-09-281-4/+2
| | | | Last-Modified header.
* Refs #27083 -- Updated conditional header comparison to match RFC 7232.Kevin Christopher Henry2016-09-161-57/+87
|
* Fixed #26567 -- Updated references to obsolete RFC2616.Vasiliy Faronov2016-05-031-1/+1
| | | | | Didn't touch comments where it wasn't obvious that the code adhered to the newer standard.
* Fixed E128 flake8 warnings in django/.Tim Graham2016-04-081-11/+9
|
* Fixed #6727 -- Made patch_cache_control() patch an empty Cache-Control header.Dwight Gunning2015-11-091-1/+1
|
* Fixed #24935 -- Refactored common conditional GET handling.Denis Cornehl2015-08-151-5/+101
|
* Removed unnecessary arguments in .get method callsPiotr Jakimiak2015-05-131-2/+2
|
* Fixed #13008 -- Added more Cache-Control headers to never_cache() decorator.Markus Bertheau2015-04-281-0/+1
|
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-1/+1
|
* Fixed #20346 -- Made cache middleware vary on the full URL.ijl2013-12-281-10/+10
| | | | | | Previously, only the URL path was included in the cache key. Thanks jamey for the suggestion.
* Fixed #21012 -- New API to access cache backends.Curtis Maloney2013-11-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks Curtis Malony and Florian Apolloner. Squashed commit of the following: commit 3380495e93f5e81b80a251b03ddb0a80b17685f5 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 14:18:07 2013 +0100 Looked up the template_fragments cache at runtime. commit 905a74f52b24a198f802520ff06290a94dedc687 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 14:19:48 2013 +0100 Removed all uses of create_cache. Refactored the cache tests significantly. Made it safe to override the CACHES setting. commit 35e289fe9285feffed3c60657af9279a6a2cfccc Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 12:23:57 2013 +0100 Removed create_cache function. commit 8e274f747a1f1c0c0e6c37873e29067f7fa022e8 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 12:04:52 2013 +0100 Updated docs to describe a simplified cache backend API. commit ee7eb0f73e6d4699edcf5d357dce715224525cf6 Author: Curtis Maloney <curtis@tinbrain.net> Date: Sat Oct 19 09:49:24 2013 +1100 Fixed #21012 -- Thread-local caches, like databases.
* Correct flake8 E302 violationsRay Ashman Jr2013-11-021-0/+12
|
* Correct flake8 violation E261Ray Ashman Jr2013-11-021-1/+1
|
* Fixed spelling ("dependant" -> "dependent")Tim Graham2013-11-011-1/+1
| | | | | | | Dependent means reliant on. A dependant is a person like a child or spouse. Thanks Andrew Wilcox for the report.
* Fixed up some more flake8 violations (this particular violation still has ↵Alex Gaynor2013-10-261-1/+1
| | | | many occurrences in the tests/ dir so it can't be removed from setup.cfg yet)
* Fixed #20989 -- Removed useless explicit list comprehensions.Simon Charette2013-08-301-5/+5
|
* Fixed #20989 -- Removed explicit list comprehension inside dict() and tuple()Tim Graham2013-08-291-1/+1
| | | | | Thanks jeroen.pulles at redslider.net for the suggestion and helper script.
* [py3] Always fed hashlib with bytes.Łukasz Langa2013-02-271-1/+1
|
* Fixed #18191 -- Don't consider Accept-Language redundantly in cache key.Łukasz Langa2013-02-251-2/+12
| | | | Thanks to choongmin for the original patch.
* Fixed #7581 -- Added streaming responses.Aymeric Augustin2012-10-201-1/+2
| | | | Thanks mrmachine and everyone else involved on this long-standing ticket.
* Replaced many smart_bytes by force_bytesClaude Paroz2012-08-291-3/+3
| | | | | | In all those occurrences, we didn't care about preserving the lazy status of the strings, but we really wanted to obtain a real bytestring.
* [py3] Fixed admin_views testsClaude Paroz2012-08-141-1/+1
| | | | Also changed several occurrences of 'request' to 'response'.
* [py3] Fixed encoding issues in cache key generationClaude Paroz2012-08-131-1/+2
|