Module cache

Module cache 

Source
Expand description

Cache retrieval and deletion endpoints.

GET and DELETE /api/v1/cache/{key} take ONE key space: the request cache_key a parse route returns (result.cache_key on POST /parse, the cache_key in every Parquet response’s X-IFC-Metadata header). Both resolve it through resolve_request_cache_key, so a key one of them accepts the other accepts too, and a key one of them refuses the other refuses with the same 400 (#5750).

Structs§

CacheDeleteResponse
Response body for DELETE /api/v1/cache/:key.
RequestCacheKey 🔒
A request cache_key checked against the writer’s own key builder: the file’s sha256 plus the opening-filter and tessellation-quality suffixes, exactly as cache_key_from_parts spells them. Borrowed from the path segment it was resolved from.

Functions§

decode_gate 🔒
delete_cached
DELETE /api/v1/cache/:key - Invalidate every cache entry for the source file a request cache_key names (issues #3636, #5750).
get_cached
GET /api/v1/cache/:key - Retrieve a cached POST /api/v1/parse result.
not_a_request_cache_key 🔒
The rejection for a {key} that is not a request cache_key. Like not_a_file_digest, the value is caller-controlled text and is not echoed.
opening_filters 🔒
Every opening filter a request key can carry. The match makes a new variant a compile error here rather than a key both cache routes refuse.
resolve_request_cache_key 🔒
THE resolver for the {key} of GET and DELETE /api/v1/cache/{key}.
tessellation_qualities 🔒
Every tessellation level a request key can carry, for the same reason.