A-Shell runtime enhancement: auto cache/download of files from a web directory if not found in the local search path. Downloaded files are cached in the directory %MIAME%/webcache, which is checked first—as in a web browser—to avoid the overhead of unnecessary web accesses.
The feature is referred to under the generic umbrella of "WEBCACHE" and may be enabled and configured via a new SET.LIT option and/or a new MIAMEX function (both described below).
Option flags determine which types of files are subject to the feature. By default it applies to images and any other kind of file operation that currently supports automatic lookup in the cache and permcache directories. Additional file/type options:
Option |
Description |
---|---|
PROG |
programs (RUN, LIT, SBX) |
OPENI |
files being opened for sequential input |
LOOKUP |
files reference by LOOKUP statement or XCALL SIZE |
Currently only a single web directory at a time is supported, although it is conceivable that multiple directories and/or trees may be implemented in the future.
The webcache directory, like the permcache directory, is not auto-cleared at the end of the session. But like a typical web browser cache, it can be cleared with a command. Individual files or files matching a pattern can also be cleared. Also, as with a typical web browser, the existence of a file in the cache short-circuits any web lookup for that file; there is no automatic comparison of file sizes or dates between the cached copy and the web copy (because this would completely undermine the performance benefit of the cache). So you have to clear the cache in order to get a refreshed copy from the web repository.