Please enable JavaScript to view this site.

A-Shell Reference

Revised and Updated August 2023

WEBCACHE is an A-Shell module that auto caches/downloads 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. As a special case, DLLs will be downloaded into the current executable directory (if write access available) so that they will found in the OS library search path.

The feature is referred to under the generic umbrella of "WEBCACHE" and may be enabled and configured via a SET.LIT option and/or a  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

DLL

Windows DLLs referenced indirectly via XCALLS (e.g. HTTP, FTP2)

 

The webcache directory, like the ATEPERMCACHE 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 (in this case, SET WEBCACHE CLEAR). Also, as with a typical web browser, the existence of a file in the cache short-circuits any web lookup for that file.  However, there is no automatic comparison of file sizes or dates between the cached copy and the web copy (because this would 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.

See Also

History

2016 October, A-Shell 6.3.1529 and 1531:  WEBCACHE function added to A-Shell.