> For the complete documentation index, see [llms.txt](https://pyot.iann838.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pyot.iann838.com/pipeline/expirations.md).

# Expirations

Expirations are used across all cache stores for managing expiration of cached objects. The configuration accepts a dictionary of endpoint key mapping to a timedelta object or number of seconds.

Global models (e.g. `riot`) will be available to all pipelines, meaning that it is allowed modify endpoints of those models in any pipeline, for example the `"account_v1_by_puuid"` in a pipeline bound to the `val` model and such object called using the `val` pipeline will use such expirations.

{% hint style="info" %}
Only data returned by the `get()` method is sinked through the pipeline, and thus the only ones that can be cached and use expirations.
{% endhint %}

By configuring this argument, it overrides the default endpoints expirations.

## Default Expiration

All expirations defaults to `0` (No-Cache). Except for static data sources (e.g. cdragon, meraki, ddragon, etc.) which defaults to `timedelta(minutes=20)` (20 minutes) due to its frequency of data changes and helping to decrease traffic load.

## Example

This will override the `summoner_v4_by_name` endpoint to cache 2 minutes, and `league_v4_challenger_league` to cache for 10 minutes, and leaving the rest of the default expirations untouched.

```python
    # ... Other Stores
        # ... Other Store Configs
        "expirations": {
            "summoner_v4_by_name": 120,
            "league_v4_challenger_league": 600, # or timedelta(minutes=10)
        }
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://pyot.iann838.com/pipeline/expirations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
