file cache

0 views
Skip to first unread message

Tom Boothby

unread,
Sep 12, 2009, 3:41:42 AM9/12/09
to saged...@googlegroups.com
I've written a *very* rough extension into the cached_function code
which implements file cacheing. Feel free to play with this or ignore
it until I polish it more.

http://sage.math.washington.edu/home/boothby/filecache.patch

Eventually, it'll be a decorator:

@cached_file(dir = 'rank')
def rank_ainvs(a1,a2):
return EllipticCurve([a1,a2]).rank()

would create (or load) a directory which contains cached results of
foo which persists across sage sessions.

But for now, you'll have to do:

def rank_ainvs(a1,a2):
return EllipticCurve([a1,a2]).rank()

rank_ainvs = CachedFunction(rank_ainvs, dir='rank')

Reply all
Reply to author
Forward
0 new messages