# Persistence

### **Lifetime configuration**

The CoherenceSync editor interface allows us to define the Lifetime of a networked object. The following options are available:

* **Session Based.** No persistence. The Entity will disappear when the Client or Simulator disconnects.
* **Persistent.** The Entity will remain on the Server until a simulating Client deletes it.

{% hint style="info" %}
For managing unique persistent objects, see [Uniqueness](/1.2.4/manual/lifetime/uniqueness.md).
{% endhint %}

### **Deleting a persistent object**

A persistent object can be deleted only by the Client or Simulator that has authority over it. For indirect remote deletion, see the section about [network commands](/1.2.4/manual/networking-state-changes/commands.md).

Deleting a persistent object is done the same as with any network object - by destroying its GameObject.

```csharp
Destroy(coherenceSync.gameObject);
```

### Persistent objects are stored

All persistent objects remain in the World for the entire lifetime of the Replication Server and, periodically, the Replication Server records the state of the World and saves it to physical storage. If the Replication Server is restarted, then the saved persistent objects are reloaded when the Replication Server resumes.

### Persistent object limits

{% hint style="warning" %}
Currently, the maximum number of persistent objects supported by the Replication Server is **32 000**. This limit will be increased in the near future.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.coherence.io/1.2.4/manual/lifetime/persistence.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
