#15692: Value of cached methods should not always be pickled
-------------------------------------+-------------------------------------
Reporter: SimonKing | Owner:
Type: defect | Status: needs_work
Priority: major | Milestone: sage-6.9
Component: pickling | Resolution:
Keywords: pickling hash | Merged in:
cache | Reviewers:
Authors: Julian Rueth | Work issues:
Report Upstream: N/A | Commit:
Branch: | 616e86189f0d3a30c4885e38e01a619005446855
u/saraedum/ticket/15692 | Stopgaps:
Dependencies: #16337 |
-------------------------------------+-------------------------------------
Changes (by vdelecroix):
* status: needs_review => needs_work
Comment:
Hello,
In `_cached_function_unpickle` instead of
{{{
for k,v in cache:
ret.cache[k] = v
}}}
you can simply do `ret.cache.update(cache)`. Moreover, in that function
you should document the argument `cache`.
I think that disabling the cache by default on pickle is a good
improvement. However, the class `ClearCacheOnPickle` that you remove in
your branch had several purposes: clear the cache on pickle but also on
copy. Your version keep the cache on copy and that might not be
appropriate for classes that used `ClearCacheOnPickle`.
Vincent
--
Ticket URL: <http://trac.sagemath.org/ticket/15692#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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.