Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/utils/cache.py
Commit message (Collapse)AuthorAgeFilesLines
* 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 ↵Markus Bertheau2015-04-281-0/+1
| | | | never_cache() decorator.
* 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-031-0/+12
|
* Correct flake8 violation E261Ray Ashman Jr2013-11-021-1/+1
|
* Fixed spelling ("dependant" -> "dependent")Tim Graham2013-11-021-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 ↵Alex Gaynor2013-10-261-1/+1
| | | | violation still has many occurrences in the tests/ dir so it can't be removed from setup.cfg yet)
* Fixed #20989 -- Removed useless explicit list ↵Simon Charette2013-08-301-5/+5
| | | | comprehensions.
* Fixed #20989 -- Removed explicit list comprehension ↵Tim Graham2013-08-291-1/+1
| | | | | | | inside dict() and tuple() 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 ↵Łukasz Langa2013-02-261-2/+12
| | | | | | redundantly in cache key. 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
|
* [py3] Encoded value before feeding it to hashlib.md5Claude Paroz2012-08-121-3/+3
|
* [py3] Ported django.utils.encoding.Aymeric Augustin2012-08-071-2/+2
| | | | | | | | | | | * Renamed smart_unicode to smart_text (but kept the old name under Python 2 for backwards compatibility). * Renamed smart_str to smart_bytes. * Re-introduced smart_str as an alias for smart_text under Python 3 and smart_bytes under Python 2 (which is backwards compatible). Thus smart_str always returns a str objects. * Used the new smart_str in a few places where both Python 2 and 3 want a str.
* Removed unneeded smart_str in cache utils.Claude Paroz2012-05-281-2/+2
|
* Fixed #17476 -- Ensure timezone-dependant cache keys ↵Aymeric Augustin2011-12-291-4/+7
| | | | | | only use ASCII characters, especially on Windows. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17286 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed a CacheKeyWarning under Windows.Aymeric Augustin2011-12-271-1/+3
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@17277 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Added support for time zones. Thanks Luke Plant for the ↵Aymeric Augustin2011-11-181-1/+4
| | | | | | | | | | | review. Fixed #2626. For more information on this project, see this thread: http://groups.google.com/group/django-developers/browse_thread/thread/cf0423bbb85b1bbf git-svn-id: http://code.djangoproject.com/svn/django/trunk@17106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Made the cache locale-dependant when USE_L10N is True, ↵Aymeric Augustin2011-11-011-1/+1
| | | | | | even if USE_I18N is False. Refs #5691. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17061 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed several problems that hid one another in the cache ↵Aymeric Augustin2011-10-271-1/+1
| | | | | | | | | | | | | | | tests and code. 1 - Used django.test.TestCase instead of unittest.TestCase so that the override_settings decorator works. 2 - Reverted parts of r17039 that caused failures (masked until 1). 3 - Isolated tests by clearing the cache in tear down (masked until 1). Refs #11505. 4 - Fixed a bug in cache key generation (revealed by 3). 5 - Fixed a test that relied on this bug -- hardcoding the generated cache keys in tests isn't a very good idea anyway. 6 - Uniformized some parts of the cache tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17042 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #16003 -- Restored compatibility of the admin when ↵Jannis Leidel2011-09-081-1/+8
| | | | | | using USE_ETAGS. Thanks for the initial patch, pterk. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16729 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #15499 -- Ensure that cache control headers don't ↵Russell Keith-Magee2011-08-231-0/+6
| | | | | | try to set public and private as a result of multiple calls to patch_cache_control with different arguments. Thanks to AndiDog for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16657 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #16225 -- Removed unused imports. Many thanks to ↵Jannis Leidel2011-07-131-1/+0
| | | | | | Aymeric Augustin for the work on the patch and Alex for reviewing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Removed a bunch more Python 2.4 workarounds now that we ↵Adrian Holovaty2011-03-281-5/+5
| | | | | | don't support that version. Refs #15702 -- thanks to jonash for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #4992 -- Respect the GET request query string when ↵Jannis Leidel2011-03-021-7/+7
| | | | | | creating cache keys. Thanks PeterKz and guettli for the initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15705 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #13283 -- Corrected ↵Carl Meyer2011-02-011-0/+10
| | | | | | CACHE_MIDDLEWARE_ANONYMOUS_ONLY's bad habit of setting Vary: Cookie on all responses and destroying cache efficiency. Thanks to natrius for the fix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15381 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Beefed up the tests for multi-cache handling of the ↵Russell Keith-Magee2010-12-221-3/+7
| | | | | | cache middleware and view decorators, and made a couple of tweaks for edge cases as a result. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15021 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #14103 -- Take USE_ETAGS setting into account when ↵Jannis Leidel2010-12-121-1/+1
| | | | | | patching the response headers. Thanks, trbs and Eric Holscher. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #14560 -- Enable HEAD requests to be cached ↵Honza Král2010-10-291-7/+7
| | | | | | | | | | properly. Thanks, codemonkey! Introducing ability to cache HEAD requests and GET requests separately by adding the method to the cache key while preserving the functionality that HEAD requests can use cached reponses generated by a GET request. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Refined changes made in r12546 to also respect the ↵Jannis Leidel2010-03-011-7/+12
| | | | | | request.LANGUAGE_CODE in case the LocaleMiddleware is used to discover the language preference. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12624 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5691 - Adds the active language to the cache key. ↵Jannis Leidel2010-02-231-7/+11
| | | | | | Thanks, Antoni Aloy, Ramiro Morales and Yann Malet. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12546 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #10016: the cache middleware no longer vomits when ↵Jacob Kaplan-Moss2009-04-011-3/+5
| | | | | | handed long URLs. Thanks, Matt Croydon. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10335 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #10387: removed some code duplication in ↵Jacob Kaplan-Moss2009-03-311-4/+7
| | | | | | django.utils.cache. Thanks, Travis Swicegood. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed typo in comment.Gary Wilson Jr2008-08-151-1/+1
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@8382 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #7919 -- md5 and sha modules are deprecated since ↵Gary Wilson Jr2008-08-021-3/+3
| | | | | | Python 2.5, use hashlib module when available. Patch from Karen Tracey. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #7228 -- Fixed our ETag header creation to meet ↵Adrian Holovaty2008-06-161-1/+1
| | | | | | the HTTP spec, by quoting it. Thanks, skjohn@us.ibm.com git-svn-id: http://code.djangoproject.com/svn/django/trunk@7659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5813 -- Taught the CacheMiddleware to respect any ↵Malcolm Tredinnick2007-11-291-0/+22
| | | | | | | | | max-age HTTP header when setting the expiry time. Thanks, SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6736 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Some minor changes to the `patch_vary_headers` function:Gary Wilson Jr2007-11-191-7/+12
| | | | | | | | | * Replaced a for loop with a list comprehension. * Used a set instead of a dict with dummy values. * Used a bit more readable variable names. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6698 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Removed `vary_delim_re` in `django/utils/cache.py` in ↵Gary Wilson Jr2007-11-191-4/+2
| | | | | | favor of existing `cc_delim_re` since the latter is more correct in parsing the header (allows whitespace before and after comma separators instead of just after). As a bonus, tests added for `patch_vary_headers()`. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6696 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5816 -- Fixed a regression from [6333] that ↵Gary Wilson Jr2007-10-311-3/+3
| | | | | | generates incorrect cookie "expires" dates when using a locale other than English. Introduced `http_date` and `cookie_date` utility functions. Thanks for the report Michael Lemaire. Thanks for the patch Karen Tracey and `SmileyChris`. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6634 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Corrected a typo and made some style fixes.Gary Wilson Jr2007-10-281-10/+14
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@6626 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5557: URLs are now properly escaped in the ↵Jacob Kaplan-Moss2007-09-291-4/+4
| | | | | | cache_page decorator. Thanks, eriks. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6435 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5047: patch_cache_control now respects existing ↵Jacob Kaplan-Moss2007-09-291-0/+7
| | | | | | max-age settings. Thanks, permon. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6434 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #4071 -- Fixed bug in cache_page decorator, which ↵Adrian Holovaty2007-09-141-2/+2
| | | | | | was setting the wrong header. Thanks, Ionut Ciocirlan (xlotlu) and permon git-svn-id: http://code.djangoproject.com/svn/django/trunk@6222 bcc190cf-cafb-0310-a4f2-bffc1f526a37