Wraf: Caching

The system will use intelligent caching and optimizations in order to gain in speed without sacrifice any flexibility. A persistant backend service deamon will take requests from clients.

The cache will primarly consist of nodes. More data will be contained inside each node.

Primary data

The primary data consists of the original information about triples, types, models, and literals. It can't be recreated if lost. The statement, types and models data is bidirectional. The objects points at its classes and the classes point at its objects. Wee keep information on whether the data has been stored yet or if it doesn't have to be stored.

Secondary data

The secondary data is infered from primary data and can be recreated if lost. It is primarly cached selections from requests.

A callback will be registred in each resource (or some grouping thereof) used for generating the result. A change in a source resource will exprire the selection. If the source data can't be made to expire the selection, normal expiration dates could be used.

Cached data will have some matadata used to expire the least needed data in order to save memory.

The key to the selection consists of it's criterions. This include the context. Only the used criterions should be part of the key. The agent is part of the context, but should not be part of the key, since the cached selection should be used by other agents with similar preferences.

Only primary data are implemented yet.