# Cache Policy

### <mark style="color:green;">What is Cache Policy?</mark>

By defining cache policy, you can determine how an application should handle caching of data on the forward and backward navigations.&#x20;

Caching stores a copy of frequently accessed data/page locally on the device to improve performance and reduce the need to fetch the same data from a remote server repeatedly.

### <mark style="color:green;">How to setup Cache Policy?</mark>

**1.)** Go to Add-ons -> Extensions -> Cache Policy.

<mark style="color:red;">**NOTE:**</mark> <mark style="color:red;">Please create a new version of the App e.x. 1.0.2, if the current version does not support this feature. If the previous version is live on the stores, then request a new build and submit this new version to the stores.</mark>

**2.)** Select from the 3 different strategies:

* **Default mode:** No data/page will be cached in this strategy. If user will login to the app then it won’t store any session data.
* **No Cache Policy:** Backward navigation will be cached but new page navigation will be always from the network.
* **Cache else Network:** This strategy uses cached resources from both backward and new navigation when they are available and not expired, otherwise it will load resources from the network.\
  **Note**: App cache expiration is based on your website's cache expiration time.


---

# 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://help.twinr.dev/extensions/cache-policy.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.
