> For the complete documentation index, see [llms.txt](https://docs.tpi.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tpi.dev/get-started/proxy-caching.md).

# Proxy Caching

Proxy caching in digiRunner enhances performance by storing frequently accessed API responses and static web resources, reducing backend load and speeding up response times for end users.

## Configuring Proxy Caching

### Select API for Caching

1. Go to **API Management** > **API List**, and search for the API you want to enable proxy caching for.
2. Select the target API, and click on the ![](https://content.gitbook.com/content/0choIC1BbdPOkKWOYGgk/blobs/zLzVo7guviTaBxhTtiLG/12.png) icon to access the update page to proceed.

<div align="left"><figure><img src="https://content.gitbook.com/content/0choIC1BbdPOkKWOYGgk/blobs/ytxpgVv83GcYN1X4lfba/proxy_cache_1.png" alt=""><figcaption></figcaption></figure></div>

### Enable API Cache

In the API settings, locate the **API Cache** field and select from the following options:

* **None**: Disables caching.
* **Adaptive**: Adjusts caching dynamically based on API usage patterns.
* **Fixed**: Caches responses for a set duration.

### **Set Cache Parameters**

1. Set the cache duration in the **Fixed Cache Time (Minute)**<mark style="color:red;">\*</mark> field, which is only available if **API Cache** is set to *Fixed*.

{% hint style="info" %}
If set to *0*, the system uses the value from **Settings** > **FIXED\_CACHE\_TIME**; otherwise, the specified time is applied.
{% endhint %}

2. Click **Update** to save and exit.

<div align="left"><figure><img src="https://content.gitbook.com/content/0choIC1BbdPOkKWOYGgk/blobs/eTE6kgmNIIvdGfR8Xgqy/proxy_cache_2.png" alt=""><figcaption></figcaption></figure></div>

## Testing Proxy Caching

### Run API Test

1. Go to **API Management** > **API Test**.
2. Select the API or static resource that you have set up for caching.
3. Send requests to the API via the **API Test** feature to verify that proxy caching is enforced.

### Observe Initial Response

Record the response time for the first request. Since this is the first access, the proxy fetches the content from the backend and stores it in the cache.

### Send Repeated Requests

1. Use the **API Test** feature to send the same request multiple times.
2. For subsequent requests, the response should be served from the cache, resulting in noticeably faster response times.

For more information, please refer to [API Test](/guide/api-management/api-test.md).


---

# 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://docs.tpi.dev/get-started/proxy-caching.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.
