temporal
Stable type · Cache
Tier: stable · Kind: type · Topic: Cache
| Python | Julia | Rust |
|---|---|---|
Temporal | not exported | Temporal |
Python
class Temporal
Temporal(kind: _Kind, ttl: Optional[_dt.timedelta] = None)
@classmethod Temporal.static() -> 'Temporal'
@classmethod Temporal.closed_period() -> 'Temporal'
@classmethod Temporal.incomplete(ttl: Union[_dt.timedelta, float, int]) -> 'Temporal'
Temporal.immutable: bool # property
The freshness policy derived from a loader’s temporal block.
Build via the classmethods rather than the raw constructor:
static— notemporalblock; immutable once fetched.closed_period— a closed past period (e.g.file_period:P1Dfor a past date); immutable, infinite TTL.incomplete— a current/incomplete period; fresh only untilttl.
Members
immutable— True for static + closed-period loaders (infinite TTL).
Julia
Julia does not export this type.
Rust
pub enum Temporal {
Static,
ClosedPeriod,
Incomplete { ttl: Duration },
}
impl Temporal { pub fn is_fresh(&self, fetched_at: &str, now: OffsetDateTime) -> bool }
A loader’s temporal nature, supplying the TTL rung of the ladder. Lets a present blob be judged valid without a network round-trip.