sharing persisten cache between modules

Fredrik Lundh fredrik at
Mon Oct 23 18:35:06 CEST 2006

Bart Ogryczak wrote:

> I´ve got a problem creating persistent cache, that would be shared
> between modules. There a supermodule, which calls submodules. I´d like
> submodules to use cache created in the supermodule. The only way I see
> right now, is to pass it as function argument, but that would require a
> change in API, which I´d prefer to avoid. Is this the only way?

does "module" mean Python module?  why not just put the cache management 
code in a module that's imported by any submodule that wants to use it ?


More information about the Python-list mailing list