Functions
infer_cache_scope
3
CacheScope
▼
Infer recommended cache scope for a block.
infer_cache_scope
3
CacheScope
▼
def infer_cache_scope(depends_on: frozenset[str], is_pure: Literal['pure', 'impure', 'unknown'], config: AnalysisConfig | None = None) -> CacheScope
Parameters
| Name | Type | Description |
|---|---|---|
depends_on |
frozenset[str] |
Context paths the block depends on. |
is_pure |
Literal['pure', 'impure', 'unknown'] |
Block purity level. |
config |
AnalysisConfig | None |
Analysis configuration (for naming conventions). Default:None
|
Returns
CacheScope
_has_prefix_match
2
bool
▼
Check if any path starts with any prefix.
Handles both "page." (prefix) and "p…
_has_prefix_match
2
bool
▼
def _has_prefix_match(paths: frozenset[str], prefixes: frozenset[str]) -> bool
Check if any path starts with any prefix.
Handles both "page." (prefix) and "page" (exact match) patterns.
Parameters
| Name | Type | Description |
|---|---|---|
paths |
frozenset[str] |
|
prefixes |
frozenset[str] |
Returns
bool