fastrag.ingestion.cache.ids#
Cache identity helpers, shared by every step that caches.
A cache id has the "{step}:{hash}" shape shown in
docs/specification/API.md’s Example 1 ("webcrawler:1a2b3c4") and
Example 2 ("charactertextsplitter:e21qcasg"): the step’s (lowercased)
name, then a short digest of what makes this particular cache entry unique.
Both helpers build on content_hash rather
than adding a second hashing scheme — the digest is just content_hash of
the two identifying strings joined by a separator that cannot occur in either
half’s raw form (a colon would: URIs and document ids may contain one).
Functions
|
Return the cache id for one document under one step configuration. |
|
Return the cache id for one fetch target under one step configuration. |
- fastrag.ingestion.cache.ids.source_cache_id(step_name, target, config_hash)[source]#
Return the cache id for one fetch target under one step configuration.