Skip to main content

Module cache

Module cache 

Source
Expand description

Freshness policy for the ontology cache (see FsTrait).

A cached copy younger than CACHE_TTL is used as is, without touching the network. An older one is refreshed, and kept when refreshing fails, so the server keeps working offline with whatever it fetched before.

Constants§

CACHE_TTL
How long a cached ontology is used before it is fetched again.

Functions§

cached
Content for the cache entry at url, fetching it with fetch when the entry is missing or older than CACHE_TTL.
store
Write content to the cache entry at url, unless it already holds it.