# `Sidereon.GNSS.ExactCache`
[🔗](https://github.com/neilberkman/sidereon-ex/blob/main/lib/sidereon/gnss/exact_cache.ex#L1)

Atomic exact-product cache transactions.

The cache binds the complete distributor-independent product identity, the
resolved distribution source, and digests and lengths for validated product,
distributor archive, and provenance bytes. Native publication uses a bounded
cross-process lock and one atomic reader-visible commit marker.

Transport and product-format validation remain caller responsibilities. A
cache hit returns authenticated bytes; callers must still parse the product
and interpret the authenticated provenance before use.

# `entry`

```elixir
@type entry() :: %{
  product: String.t(),
  archive: String.t(),
  provenance: String.t(),
  entry_id: String.t(),
  product_bytes: binary(),
  archive_bytes: binary(),
  provenance_bytes: binary()
}
```

# `cleanup_abandoned`

```elixir
@spec cleanup_abandoned(term()) :: :ok | {:error, term()}
```

Removes unreferenced transaction artifacts while the writer lock is held.

# `committed_files`

```elixir
@spec committed_files(term()) :: {:ok, entry()} | :miss | {:error, term()}
```

Reads a complete digest-verified entry through a lock-owning handle.

# `committed_files`

```elixir
@spec committed_files(
  String.t(),
  Sidereon.GNSS.Distribution.ProductIdentity.t(),
  atom()
) ::
  {:ok, entry()} | :miss | {:error, term()}
```

Reads a complete digest-verified entry without taking the writer lock.

# `control_directory`

```elixir
@spec control_directory() :: String.t()
```

Returns the shared cache protocol's control-directory name.

# `publish`

```elixir
@spec publish(term(), binary(), binary(), binary()) ::
  {:ok, entry()} | {:error, term()}
```

Publishes validated bytes as one immutable transaction.

# `with_lock`

```elixir
@spec with_lock(
  String.t(),
  Sidereon.GNSS.Distribution.ProductIdentity.t(),
  atom(),
  non_neg_integer(),
  (term() -&gt; result)
) :: result
when result: term()
```

Runs an operation while holding the bounded cross-process writer lock.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
