# Cached Responses

To improve performance and reliability, cached responses are served whenever available. If a requested page exists in cache, the data is returned immediately with a 100% Success Rate, bypassing common issues such as network delays, timeouts, and blocking.

{% hint style="success" %}
This feature applies **`only`** to requests that include the `ultra_premium=true` parameter and is enabled by default.
{% endhint %}

### Why is this good? <a href="#why-is-this-good" id="why-is-this-good"></a>

* **Difficult Pages**: Perfect for pages that are challenging to scrape.
* **10-Minute Updates**: No older than 10 minutes cached value.
* **Guaranteed Success**: 100% success rate for cached results.
* **Faster Response Times**: Retrieve data quicker from cached results.
* **Fewer Retries**: Reduced number of retries needed to serve back the response.

### What's in it for you?

* ��**`Increased Efficiency:`** Save time and resources by reducing the need to scrape the same page multiple times.
* ✅**`Improved Reliability:`** Enhance the reliability of your scraping tasks with consistent and timely data retrieval.

### Advanced Use-Case Scenario

For cases where real-time data is required, you can ensure the API serves uncached data by adding the parameter `cache_control=no-cache`  to the URL, as shown below:

```bash
https://api.scraperapi.com/?api_key=APIKEY&ultra_premium=true&cache_control=no-cache&url=https://example.com/
```

We tag cached responses with the `sa-from-cache: 1` response header, making it easy to distinguish between a cached and non-cached response.


---

# 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.scraperapi.com/control-and-optimization/cached-responses.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.
