| | 339 | The cache timeout can be a template variable, as long as the template variable |
|---|
| | 340 | resolves to an integer value. For example, if the template variable |
|---|
| | 341 | ``my_timeout`` is set to the value ``600``, then the following two examples are |
|---|
| | 342 | equivalent:: |
|---|
| | 343 | |
|---|
| | 344 | {% cache 600 sidebar %} ... {% endcache %} |
|---|
| | 345 | {% cache my_timeout sidebar %} ... {% endcache %} |
|---|
| | 346 | |
|---|
| | 347 | This feature is useful in avoiding repetition in templates. You can set the |
|---|
| | 348 | timeout in a variable, in one place, and just reuse that value. |
|---|
| | 349 | |
|---|