Version: v0.2.0

temporal

Stable type · Cache

Tier: stable · Kind: type · Topic: Cache

PythonJuliaRust
Temporalnot exportedTemporal

Python

class Temporal
Temporal(kind: _Kind, ttl: _dt.timedelta | None = None)
@classmethod Temporal.static() -> Temporal
@classmethod Temporal.closed_period() -> Temporal
@classmethod Temporal.incomplete(ttl: _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 — no temporal block; immutable once fetched.
  • closed_period — a closed past period (e.g. file_period:P1D for a past date); immutable, infinite TTL.
  • incomplete — a current/incomplete period; fresh only until ttl.

Members

  • immutable — True for static + closed-period loaders (infinite TTL).

Source

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.

Source · Rust docs