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 /django/middleware/cache.py | |
| 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 'django/middleware/cache.py')
| -rw-r--r-- | django/middleware/cache.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/middleware/cache.py b/django/middleware/cache.py index 6302a172c7..34bf0ca4a4 100644 --- a/django/middleware/cache.py +++ b/django/middleware/cache.py @@ -23,7 +23,7 @@ Django's ``LocaleMiddleware``. More details about how the caching works: -* Only parameter-less GET or HEAD-requests with status code 200 are cached. +* Only GET or HEAD-requests with status code 200 are cached. * The number of seconds each page is stored for is set by the "max-age" section of the response's "Cache-Control" header, falling back to the @@ -135,7 +135,7 @@ class FetchFromCacheMiddleware(object): Checks whether the page is already cached and returns the cached version if available. """ - if not request.method in ('GET', 'HEAD') or request.GET: + if not request.method in ('GET', 'HEAD'): request._cache_update_cache = False return None # Don't bother checking the cache. |
