#16505: Add unset_cache() to remove single keys from a cached_method
-------------------------------------+-------------------------------------
Reporter: saraedum | Owner:
Type: enhancement | Status: needs_work
Priority: minor | Milestone: sage-7.0
Component: misc | Resolution:
Keywords: cached_method | Merged in:
Authors: Julian Rueth | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/saraedum/ticket/16505 | 9cee22e0b83fb18a699df9d898f5d437b5cdb2a2
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by jdemeyer):
* status: needs_review => needs_work
* milestone: sage-6.4 => sage-7.0
Comment:
Replying to [ticket:16505 saraedum]:
> Currently, there is no way to only remove some keys. This is sometimes
necessary if values in the cache are not usable anymore
For this use case, I see no reason to raise `KeyError` when the key does
not exist: I would just ignore non-existing keys.
You should add doctests showing that this also works for a weak cached
function and a cached method (not just plain cached functions).
--
Ticket URL: <http://trac.sagemath.org/ticket/16505#comment:16>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.