cache
Cache backends for Rago steps.
Classes:
-
Cache–Abstract cache backend used by pipeline steps.
-
CacheFile–File-based cache backend implemented with joblib.
Cache
Abstract cache backend used by pipeline steps.
Methods:
-
get_file_key–Normalize a cache key into a stable string representation.
-
load–Load cached data for the given key.
-
save–Persist data in the cache.
get_file_key
get_file_key(key: Any) -> str
Normalize a cache key into a stable string representation.
Source code in src/rago/extensions/cache.py
27 28 29 | |
load
abstractmethod
load(key: Any) -> Any
Load cached data for the given key.
Source code in src/rago/extensions/cache.py
19 20 21 | |
save
abstractmethod
save(key: Any, data: Any) -> None
Persist data in the cache.
Source code in src/rago/extensions/cache.py
23 24 25 | |
CacheFile
CacheFile(target_dir: Path | str)
Bases: Cache
File-based cache backend implemented with joblib.
Methods:
-
get_file_key–Normalize a cache key into a stable string representation.
-
get_file_path–Return the file path for a given cache key.
-
load–Load cached data if present.
-
save–Persist cached data to disk.
Source code in src/rago/extensions/cache.py
38 39 40 | |
get_file_key
get_file_key(key: Any) -> str
Normalize a cache key into a stable string representation.
Source code in src/rago/extensions/cache.py
27 28 29 | |
get_file_path
get_file_path(key: Any) -> Path
Return the file path for a given cache key.
Source code in src/rago/extensions/cache.py
42 43 44 | |
load
load(key: Any) -> Any
Load cached data if present.
Source code in src/rago/extensions/cache.py
46 47 48 49 50 51 | |
save
save(key: Any, data: Any) -> None
Persist cached data to disk.
Source code in src/rago/extensions/cache.py
53 54 55 56 | |