instant team mailing list archive
-
instant team
-
Mailing list archive
-
Message #00252
Re: import_module
On Thu, Sep 04, 2008 at 04:26:24PM +0200, Martin Sandve Alnæs wrote:
> 2008/9/4 Anders Logg <logg@xxxxxxxxx>:
> > On Thu, Sep 04, 2008 at 03:59:52PM +0200, Martin Sandve Alnæs wrote:
> >> I know, the in-memory cache isn't quite done. I'll look at it.
> >
> > ok.
> >
> > It's important that this step is fast, so it should be as simple as
> > possible. Isn't it just a matter of doing
> >
> > if object in cache:
> > return cache[object]
> >
> > signature = object.signature()
> > if signature in cache:
> > return cache[signature]
> >
> > Then look at the disc-cache
> >
>
> Except that object doesn't have .signature if it is a string.
>
> Try now. I don't have any tests for this, we need better test coverage.
Yes, it seems to work now, at least in part. I don't get an error at
least, but I have some more code to write (remove) before I know if it
works.
--
Anders
Attachment:
signature.asc
Description: Digital signature
Follow ups
References