diff options
| author | Jannis Leidel <jannis@leidel.info> | 2011-03-02 12:47:36 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2011-03-02 12:47:36 +0000 |
| commit | f6c991667f6f1ab8d2fd2afc1ee2b5801e78b7e3 (patch) | |
| tree | 0fcdcbff97c5fe84098321b9af11b0568a9a6661 /docs | |
| parent | a9ace1466d0a57a020fd1318378df474352ba27a (diff) | |
Fixed #4992 -- Respect the GET request query string when 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
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/1.3.txt | 3 | ||||
| -rw-r--r-- | docs/topics/cache.txt | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/docs/releases/1.3.txt b/docs/releases/1.3.txt index 29e4fd46f5..66f78ba0c4 100644 --- a/docs/releases/1.3.txt +++ b/docs/releases/1.3.txt @@ -169,6 +169,9 @@ Secondly, :ref:`Versioning <cache_versioning>`, :ref:`site-wide prefixing <cache_key_prefixing>` and :ref:`transformation <cache_key_transformation>` has been added to the cache API. +Thirdly, the :ref:`cache key creation <using-vary-headers>` has been +updated to take the GET request query string into account. + Lastly, support for pylibmc_ has been added to the memcached cache backend. diff --git a/docs/topics/cache.txt b/docs/topics/cache.txt index 5acd53eeb8..4eb9d21536 100644 --- a/docs/topics/cache.txt +++ b/docs/topics/cache.txt @@ -962,9 +962,13 @@ mechanism should take into account when building its cache key. For example, if the contents of a Web page depend on a user's language preference, the page is said to "vary on language." +.. versionchanged:: 1.3 + In Django 1.3 the full request path -- including the query -- is used + to create the cache keys, instead of only the path component in Django 1.2. + By default, Django's cache system creates its cache keys using the requested -path (e.g., ``"/stories/2005/jun/23/bank_robbed/"``). This means every request -to that URL will use the same cached version, regardless of user-agent +path and query -- e.g., ``"/stories/2005/?order_by=author"``. This means every +request to that URL will use the same cached version, regardless of user-agent differences such as cookies or language preferences. However, if this page produces different content based on some difference in request headers -- such as a cookie, or a language, or a user-agent -- you'll need to use the ``Vary`` |
