#6927: extend CachedFunction to handle disk-cache [with patch, not ready]
-------------------------+--------------------------------------------------
Reporter: boothby | Owner: boothby
Type: enhancement | Status: new
Priority: major | Milestone: sage-feature
Component: misc | Keywords: cache database
Reviewer: | Author: boothby
Merged: |
-------------------------+--------------------------------------------------
Comment(by was):
Comments on the first patch:
{{{
yo
[4:32pm] williamstein:
Do you break pickling? I'm curious.
[4:32pm] williamstein:
that lambda scares me.
[4:32pm] williamstein:
You could do: "stringify = lambda k: arguments_to_string(f,k) "
[4:33pm] williamstein:
via a partial function evaluation object (which is also somewhere in
Python -- see ref guide) and avoid the lambda whilst making sure to not
break pickling.
[4:33pm] williamstein:
Pickling would of course only be an issue if you generalize this to
methods of a class.
[4:33pm] williamstein:
Oh, it could also be a problem if you say combine this with @parallel and
multiprocessing.
[4:33pm] williamstein:
Have you tried that?
[4:34pm] williamstein:
boothby_ -- ping
[4:34pm] williamstein:
I don't like this: "if isinstance(cache, FileCache) and
clear_disk_cache_too != 'yes I mean it':"
[4:34pm] williamstein:
It needs to be broken down a little more so that one gets an error if
clear_disk_cache_too is true but not that string.
[4:35pm] williamstein:
As is, it is undocumented and you would never know how to use it without
reading the source.
[4:36pm] williamstein:
the empty line 560 should be deleted, I think.
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6927#comment:2>
Sage <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---