Rob Mayoff wrote:
>
> > I have ADP's that use 'source' and 'package require' while the ADP
> > may not change, the files that get source'd and require'd may.  So,
> > maybe 10 of my ADP's should be cached, but one shouldn't.  Any
> > thoughts?
>
> Changing a file that is sourced from an ADP isn't a problem: the source
> command is executed every time the ADP is executed, and "source" doesn't
> cache the file contents.
>
> Changing a required package will probably not be effective, but that
> has nothing to do with ADP caching.  The Tcl interpreter remembers which
> packages have been loaded.


you could ns_register_proc a proc that does a "package forget"
and then a "package require" on all the packages that you
would like to "refresh" at a later date.

you could even make a generic one that does all your package
forgets/requires  through
introspection (via 'package names')
if you name your packages in a structured way.

-mike

Reply via email to