Ticket #5449 (closed defect: fixed)

Opened 13 months ago

Last modified 10 months ago

[with patch, positive review] Implements a variant of @cached_method with cache stored in the parent

Reported by: nthiery Owned by: nthiery
Priority: major Milestone: sage-4.0
Component: misc Keywords: cached_method, cache
Cc: sage-combinat Author(s):
Report Upstream: Reviewer(s):
Merged in: Work issues:

Description (last modified by nthiery) (diff)

When the elements of a parent do not have unique representation, it can be desirable to store the cache of (some of) the methods in the parent rather than in the element.

This patches implements a variant @cached_in_parent_method of the decorator @cached_method which does just this.

Attachments

cached_in_parent_method-5449-submitted.patch Download (4.2 KB) - added by nthiery 11 months ago.

Change History

Changed 11 months ago by nthiery

  • cc sage-combinat added

Changed 11 months ago by nthiery

Changed 11 months ago by nthiery

  • keywords cached_method, cache added
  • summary changed from Implement @cache_method with cache stored in the parent to [with patch, needs review] Implements a variant of @cached_method with cache stored in the parent
  • description modified (diff)
  • milestone changed from sage-combinat to sage-4.0

Changed 10 months ago by roed

  • summary changed from [with patch, needs review] Implements a variant of @cached_method with cache stored in the parent to [with patch, positive review] Implements a variant of @cached_method with cache stored in the parent

Passes doctests, good documentation.

Changed 10 months ago by nthiery

  • status changed from new to assigned

Changed 10 months ago by mabshoff

  • status changed from assigned to closed
  • resolution set to fixed
  • milestone changed from sage-4.0.1 to sage-4.0

Merged in Sage 4.0.rc1.

Cheers,

Michael

Note: See TracTickets for help on using tickets.