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')