Logiweb(TM)

13.2.4.4 Caches

Prev Up Next Page 408 of 800 Search internet


As mentioned, when 'loading' a Logiweb reference one obtains a Logiweb 'cache'. Loading a reference is univocal, so loading a reference twice gives the same cache both times.

Loading a reference may require quite some computational resources, so it is reasonable to avoid loading the same reference twice.

The cache of a page is an array which maps cardinals to values. The cache of a page maps the cardinal 0 to the reference cardinal of the page itself. Furthermore, the cache of a page maps the reference cardinals of the page and all its transitively referenced pages to the 'racks' of each page.

The 'rack' of a page is another array which maps cardinals to values. We refer to an array of inhomogeneous data as a 'rack' and to the indexes of such an array as 'hooks'. The hooks are strings like 'bibliography' and 'dictionary' converted to cardinals.

The rack of a page maps the bibliography hook to the bibliography of the page, the dictionary hook to the dictionary of the page, and so on. The rack of a page has the following hooks:

bibliography
A list of references
dictionary
An array which maps indexes to arities
body
The body as unpacked from the vector represented as a tree structure.
cluster
An array which maps references to the caches of transitively referenced pages. Contrary to the cache of the page, the cluster only contains transitively referenced pages, not the page itself. Furthermore, the cluster maps references to page caches rather than racks.
vector
A sequence of bytes: the original bytes from which the page was unpacked.
diagnose
Absent if the page is correct. Otherwise, a tree structure which, when rendered, explains what is wrong with the page.
codex
A collection of all definitions present on the page.
code
Compiled versions of all value definitions on the page.
expansion
The macro expanded version of the body represented as a tree structure.

One purpose of caches is to avoid loading the same reference more than once. Another is that the cache of a page constitutes the well-defined subset of the entire Logiweb that is needed for codifying, verifying, executing, and rendering the page.

To unpack a page one has, among other, to load all proper entries in the bibliography of the page. Loading those entries involves unpacking which may require further pages to by loaded and so on. Hence, unpacking a page includes loading all pages reachable from the page through bibliographic references. The process stops when reaching 'base' pages which are pages with no proper bibliographic entries.

Prev Up Next Page 408 of 800 Search logiweb.eu

Copyright © 2010 Klaus Grue, GRD-2010-01-05