mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-12 20:45:20 +02:00
feat(etl-cache): add cache blob object-key builder
This commit is contained in:
parent
8d3238bcd1
commit
d9b1b491e9
1 changed files with 12 additions and 0 deletions
12
surfsense_backend/app/etl_pipeline/cache/storage/object_keys.py
vendored
Normal file
12
surfsense_backend/app/etl_pipeline/cache/storage/object_keys.py
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
"""Object keys for cached markdown, namespaced under a dedicated prefix."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from app.etl_pipeline.cache.schemas import ParseKey
|
||||
|
||||
CACHE_PREFIX = "etl_cache"
|
||||
|
||||
|
||||
def build_parse_object_key(key: ParseKey) -> str:
|
||||
# Content-addressed: identical bytes + recipe always map to the same key.
|
||||
return f"{CACHE_PREFIX}/{key.source_sha256}/{key.object_suffix}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue