Opened 4 years ago

Closed 4 years ago

#17088 closed Bug (fixed)

_generate_cache_key() doesn't use the "method" parameter

Reported by: Cosi Owned by: nobody
Component: Core (Cache system) Version: 1.3
Severity: Normal Keywords: cache
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

_generate_cache_key() from django.utils.cache module makes no use of the method parameter passed to the function. Instead, it uses the method attribute of the request parameter.
Changing:
{{{cache_key = 'views.decorators.cache.cache_page.%s.%s.%s.%s' % (

key_prefix, request.method, path.hexdigest(), ctx.hexdigest())}}}

to
{{{cache_key = 'views.decorators.cache.cache_page.%s.%s.%s.%s' % (

key_prefix, method, path.hexdigest(), ctx.hexdigest())}}}

would resolve the problem.

Change History (1)

comment:1 Changed 4 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to fixed
  • Status changed from new to closed

I fixed that at r17042.

Note: See TracTickets for help on using tickets.
Back to Top