setup.mcache( envir, fpath, refs)
mcache
attribute of envir
, by defaultenvir
for each element in refs
. The active binding for an object myobj
will be a function which keeps the real data in its own environment, reading and writing it as required. Writing a new value will give attr( envir, "mcache")[ "myobj"]
a negative sign. This signals that the "obj*.rda" file needs updating, and the next Save
(or move
or cd
) command will do so. [The "*" is the absolute value of attr( envir, "mcache")[ "myobj"]
.] One wrinkle is that the "real data" is initially a promise
created by delayedAssign
, which will fetch the data from disk the first time it is needed.mlazy
, makeActiveBinding