# Omnistone

* Type: Cache
* Description: In-Memory Cache that lives for the lifetime of the project runtime. Since it lives in Python memory, it's the fastest cache.

This Cache doesn't expire data after it is *expired*. To prevent memory overflow, a cull system is in place. When the amount of data reaches a limit, it calls the `expire()` coroutine on its own. If the amount of data is still higher than `MAX_ENTRIES` \* (1 - 1/`CULL_FRECUENCY`), it deletes items until its less than the limit. Deletion prioritizes least recently used data.

## *class* `Omnistone`

Backend: `pyot.stores.omnistone.Omnistone`

Definitions:

* `__init__`
  * `max_entries: int = 10000`

    > The maximum amount of items to hold before expiring
  * `cull_frecuency: int = 2`

    > The 1/x ratio of max\_entries to be culled. Manual expiring will not trigger culling.
  * `expirations`: `Dict[str, int | float | timedelta] = None`
  * `log_level`: `int = 0`


---

# 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://pyot.iann838.com/stores/omnistone.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.
