#18260: Cache tag doesn't handle filter expresssions
---------------------------------+------------------------------------
Reporter: FunkyBob | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: cache | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------
Comment (by wkeeling):
I was looking through the easy pickings and thought I'd write a regression
test for this one. Whilst working on the test I discovered that because
the cache tag now does parser.compile_filter for all its arguments, it was
converting the fragment name into a filter expression. This caused the
cache tag to treat the fragment name as a variable and attempt to look it
up in its context. The lookup would return nothing, and so the resulting
cache key would be missing the fragment name. This would then cause the
wrong fragments to be returned from the cache in certain cases.
I've attached a new patch (which doesn't treat the fragment name as a
filter expression) plus the regression tests.
--
Ticket URL: <https://code.djangoproject.com/ticket/18260#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.