Code

Opened 7 years ago

Closed 7 years ago

#4421 closed (invalid)

Caching documentation reports that cache_page takes two arguments.

Reported by: kris.kowal@… Owned by: jacob
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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)

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by Gary Wilson <gary.wilson@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

The problem is that cache_page does not adhere to Python's decorator notation, see #1015. Also, the cache_page decorator should be able to take more than a single argument (it should be able to take all the arguments that the CacheMiddleware's constructor takes since the decorator is created from the CacheMiddleware class).

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.