#18110 closed Cleanup/optimization (fixed)
Improve template cache tag documentation
Reported by: | Julian Bez | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | florian+django@… | Triage Stage: | Ready for checkin |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
For me it was not clear that the fragment name cannot be a variable. I just found out by wondering about errors and having a quick look into Django's code. It should be made more clear that the second argument will not be resolved even though all the others will be (even the cache time gets resolved).
"It takes at least two arguments: the cache timeout, in seconds, and the name to give the cache fragment. For example:"
should at least be something like
"It takes at least two arguments: the cache timeout, in seconds, and the name to give the cache fragment. The name will be taken as is, do not use a variable. For example:"
https://docs.djangoproject.com/en/dev/topics/cache/#template-fragment-caching
Change History (6)
comment:1 by , 12 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 12 years ago
comment:3 by , 12 years ago
Cc: | added |
---|
comment:4 by , 12 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
There's an open pull request at https://github.com/django/django/pull/153
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Shouldn't we instead add a new cache tag to our future library to get this tag in line with the other tags (like we did with url and ssi)?