# `ExWapp.Session.DeviceCache`
[🔗](https://github.com/elchemista/ex_wapp/blob/v0.1.5/lib/ex_wapp/session/device_cache.ex#L1)

Persists recently observed multi-device fanout targets.

Live USync remains the primary source of truth. The cache is used only as a
fallback when a transient USync response is incomplete. Cached-only targets
should be treated as soft candidates by callers.

# `evict_devices`

```elixir
@spec evict_devices(term(), [term()]) :: :ok
```

# `invalidate_bases`

```elixir
@spec invalidate_bases(term(), [term()]) :: :ok
```

Invalidates complete cached device lists for one or more identities.

Device notifications carry deltas, not authoritative lists. Removing the
whole PN/LID-related cache entry ensures that the next send performs USync
instead of treating a partial notification as the current fanout set.

# `persist_observed_device`

```elixir
@spec persist_observed_device(term(), term()) :: :ok
```

# `persist_usync_map`

```elixir
@spec persist_usync_map(term(), map()) :: :ok
```

# `resolve_recent_devices`

```elixir
@spec resolve_recent_devices(term(), term(), map()) :: [String.t()]
```

---

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