# Managing the workspace schema cache

You can configure a workspace to [cache the source database schema](https://docs.tonic.ai/app/managing-workspaces/workspace-configuration-settings/schema-management-settings#schema-cache-config), to reduce the number of times that Tonic Structural needs to query the source database.

## Viewing the schema cache status <a href="#schema-cache-status" id="schema-cache-status"></a>

When schema caching is enabled for a workspace, then in the [expanded version of the workspace management view header](https://docs.tonic.ai/app/managing-workspaces/selecting-a-workspace-to-manage#collapsing-and-expanding-the-workspace-heading), below the workspace name, Structural shows the current status of the schema cache.

<figure><img src="https://3378426797-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSQCLFQ4bslJ-HYc8c3%2Fuploads%2FuvJXJmaScufDqlkmw0up%2FWorkspaceSchemaCacheStatus.png?alt=media&#x26;token=7494ce29-40dd-41ed-87f8-f692fbabfb73" alt=""><figcaption><p>Schema cache status for a workspace</p></figcaption></figure>

The status indicates when:

* Structural is retrieving the schema information.
* Structural is checking for schema updates.
* Structural is refreshing the schema cache.
* Structural fails to connect to the source database.
* The schema cache refresh fails.
* The schema cache is updated. The status includes the timestamp of the most recent refresh.

## Refreshing the schema cache <a href="#schema-cache-refresh" id="schema-cache-refresh"></a>

When the schema cache is updated, or when Structural has detected updates to the schema, then the schema cache status includes an option to refresh the schema cache.

<figure><img src="https://3378426797-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSQCLFQ4bslJ-HYc8c3%2Fuploads%2FS91ukPA18y98kpJP1CXd%2FWorkspaceSchemaCacheRefreshOption.png?alt=media&#x26;token=7e174a47-4fae-46e8-ad73-319b262b44b7" alt=""><figcaption><p>Refresh Schema option for a workspace schema cache</p></figcaption></figure>

To refresh the schema:

1. Click the schema cache status.
2. On the panel, click **Refresh Schema**.

Structural starts a new schema retrieval job. To track the progress of the job, go to the [workspace **Jobs** view](https://docs.tonic.ai/app/workspace/jobs).


---

# 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.tonic.ai/app/workspace/workspace-schema-cache.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.
