Opened 18 years ago
Closed 18 years ago
#4421 closed (invalid)
Caching documentation reports that cache_page takes two arguments.
Reported by: | Owned by: | Jacob | |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Toward the middle of the page, we see this line of code:
slashdot_this = cache_page(slashdot_this, 60 * 15)
That the statements "cache_page takes one argument" and "subscribes to Python's decorator notation" would be more consistent with this line of code:
slashdot_this = cache_page(60 * 15)(slashdot_this)
Note:
See TracTickets
for help on using tickets.
The problem is that
cache_page
does not adhere to Python's decorator notation, see #1015. Also, thecache_page
decorator should be able to take more than a single argument (it should be able to take all the arguments that theCacheMiddleware
's constructor takes since the decorator is created from theCacheMiddleware
class).