Opened 6 years ago

Closed 6 years ago

#30107 closed Cleanup/optimization (fixed)

Cached template loader's cache_key() method has unused dirs_prefix variable

Reported by: Nasir Hussain Owned by: Nasir Hussain
Component: Template system Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Regarding the comment on https://github.com/django/django/blob/master/django/template/loaders/cached.py#L69

There was a parameter template_dirs which was deprecated and removed a long time ago. Now cache key only uses template_name and skip. So the comment should be updated from Generate a cache key for the template name, dirs, and skip to Generate a cache key for the template name and skip.

Change History (4)

comment:1 by Nasir Hussain, 6 years ago

Owner: changed from nobody to Nasir Hussain
Status: newassigned

comment:2 by Tim Graham, 6 years ago

Component: DocumentationTemplate system
Has patch: set
Summary: Templates cached Loader documentation is outdatedCached template loader's cache_key() method has unused dirs_prefix variable
Triage Stage: UnreviewedAccepted

For future reference, you can send a pull request without a ticket for typo fixes.

I noticed the dirs_prefix variable is also unused since 5d8da093a974f41e08573bbe0d32d5ffeaadd0ad.

PR

in reply to:  2 comment:3 by Nasir Hussain, 6 years ago

Replying to Tim Graham:

For future reference, you can send a pull request without a ticket for typo fixes.

Sure, I'll.

I noticed the dirs_prefix variable is also unused since 5d8da093a974f41e08573bbe0d32d5ffeaadd0ad.

PR

Thanks for updating it.

comment:4 by GitHub <noreply@…>, 6 years ago

Resolution: fixed
Status: assignedclosed

In fe6d5a2d:

Fixed #30107 -- Removed unused dirs variable from cache template loader keys.

Unused since 5d8da093a974f41e08573bbe0d32d5ffeaadd0ad.

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