Time-to-Live Eviction Strategy

A common implementation is the time-based replication design pattern, in which you use a Time‑to‑Live (TTL) Eviction strategy to set document retention logic; for example, logic specifying that only data written to the local Ditto store within the past 24 hours persists on the device.

The implementation process of the time-based replication design pattern with a TTL Eviction strategy varies based on your approach to TTL-based eviction management:

  • Big Peer Management (Recommended) — Through regular interval HTTP API calls, the Big Peer cloud deployment delegates all TTL-based evictions mesh-wide. (For instructions, see Big-Peer-Based Evictions )

    By opting for the Big Peer approach, you ensure that locally stored documents sync with the Big Peer *before *eviction.

  • Small Peer Local Management — Each Small Peer device manages its own TTL-based evictions. (For instructions, see Small-Peer-Based Evictions )