Changes between Initial Version and Version 9 of Ticket #19949
- Timestamp:
- Aug 24, 2013, 1:17:02 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #19949
- Property Cc added
- Property Component Uncategorized → Template system
- Property Has patch set
- Property Keywords templates cache added
- Property Type Uncategorized → Cleanup/optimization
- Property Triage Stage Unreviewed → Accepted
- Property Owner changed from to
- Property Status new → closed
- Property Resolution → fixed
-
Ticket #19949 – Description
initial v9 1 1 In cases where multiple fallback templates are requested to the template loader (i.e. `django.template.loader.select_template()`) to find the first one available, the cached template loader does not cache non-existent templates, making cached loader "slow" again if every time it has to try looking for a template that's been already found to be missing. 2 2 3 `` 3 {{{ 4 4 from django.template.loader import render_to_string 5 5 render_to_string(['missing_template_1.html', 'missing_template_2.html', ..., 'missing_template_N.html', 'existent_template.html']) 6 `` 6 }}} 7 7 8 8 When using `django.template.loaders.cached.Loader`, and given that snippet above, and the fact that `missing_template_1.html` ... `missing_template_N.html` do not exist, the filesystem loader or other loaders get hit every time (trying and trying to find already known as missing templates).