# About caching

## Overview

Certain skills, such as account-information, require data to be retrieved as fast as possible by your tenant apps. In order to make this data available with no restrictions and aim for realtime, Finqware builds a temporary data cache that stores & indexes relevant data (eg: accounts, transactions).

### Parameters

This data cache is governed by two parameters configured at tenant-skill level: when you configure your tenant app with a certain skill, you may update these parameters:

* **consent\_duration**: how long (in minutes) until the consent (pointed by credentials\_id) is marked as expired and can no longer be used. By default this is 90 days (129600 minutes).
* **cache\_max\_data\_retention**: the maximum amount of time data is kept in the cache. By default this is 120 days (172800 minutes).

### Force consent expiration & data deletion

The [Consents API](https://github.com/finqware/gitbook-public-docs/blob/main/dev-guide/consuming-data/broken-reference/README.md) allows a tenant app to delete a specific consent (pointed by credentials\_id) by using the delete operation.

Optionally, you may specify the **pcd\_data\_retention** parameter (pcd stands for *post consent delete*) that would overwrite the cache\_max\_data\_retention *for that particular consent only*. Say for example you want to delete the cached data immediately at the same time the consent is deleted - you would specify a value of 0 and Finqware will permanently delete the cached data for that consent as soon as possible.

If you do not specify a value for the **pcd\_data\_retention** parameter, cached data will be deleted as usual, according to the **cache\_max\_data\_retention**.

### FAQ

How often does the data expiration jobs run?

\*\* **\_**&#x41;:\*\* Every two hours at the moment.\_

What exactly is the data expiration job doing?

\_ **A**: This is a background job that automatically expires consent objects based on the **consent\_duration** parameter and permanently removes data from the cache based on the **cache\_max\_data\_retention** parameter.\_

What happens when a **credentials\_id** is automatically marked as expired?

***A:** API calls that require the credentials\_id will return a 401 error (unauthorized / inactive\_credentials).*

Are you planning to have a parameter to bypass entirely the Finqware cache and make a request back-to-back with the 3rd party API?

*\*\* A: \*\*Yes, on the roadmap.*

Are you planning to have an option to encrypt the cache with an encryption key provided by the tenant app?

*\*\* A: \*\*Yes, on the roadmap. Note that this option will make indexing data impossible and hence queries using filtering will not work.*


---

# 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.finqware.com/dev-guide/consuming-data/about-caching.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.
