> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maximem.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Maximem Synap is a managed memory layer for AI agents: it ingests conversations and documents, extracts structured memory, and returns scoped context to the agent at retrieval time.
> The Python and JavaScript/TypeScript SDKs are the supported way to use Synap. Write integration code with SDK calls, not raw HTTP requests.
> Start with the Quickstart: https://docs.maximem.ai/getting-started/quickstart.md. Every SDK method is documented in the SDK reference: https://docs.maximem.ai/sdk-reference/overview.md.
> For requests about adding Vity memory to OpenClaw, Hermes, an MCP client, or a browser, start with the Vity Quickstart: https://docs.maximem.ai/vity/quickstart.md.

# cache.clear

> Clear all locally-cached SDK data, including fetched context bundles and anticipation entries.

```python Python theme={null}
sdk.cache.clear()
```

```typescript TypeScript theme={null}
sdk.cache.clear()
```

`clear()` wipes the SDK's in-process cache: every scope, every user, every customer. This affects only the local cache layer; durable memory stored on the Synap platform is untouched. The cache repopulates lazily on subsequent `fetch()` calls. Useful in tests, in long-running processes that need to drop stale entries, or when you want to force a fresh round-trip to the platform.

This is a synchronous method, no `await`.

### Parameters

This method takes no parameters.

### Returns

Returns `None`.

### Example

```python Python theme={null}
from maximem_synap import MaximemSynapSDK

sdk = MaximemSynapSDK(api_key="synap_your_key_here")

# Drop every locally-cached entry; the next fetch() will hit the platform.
sdk.cache.clear()
```

```javascript JavaScript theme={null}
import { SynapClient } from '@maximem/synap-js-sdk';

const sdk = new SynapClient({ apiKey: 'synap_your_key_here' });

// Drop every locally-cached entry; the next fetch() will hit the platform.
sdk.cache.clear();
```

```typescript TypeScript theme={null}
import { SynapClient } from '@maximem/synap-js-sdk';

const sdk = new SynapClient({ apiKey: 'synap_your_key_here' });

// Drop every locally-cached entry; the next fetch() will hit the platform.
sdk.cache.clear();
```

### Raises

This method does not raise SDK errors. See [Error Codes](https://docs.maximem.ai/sdk-reference/errors.md) for the full SDK exception hierarchy.

### See also

* [cache.clear\_user](https://docs.maximem.ai/sdk-reference/cache/clear-user.md): drop one user's cached data (GDPR).
* [cache.clear\_customer](https://docs.maximem.ai/sdk-reference/cache/clear-customer.md): drop one customer's cached data.
* [cache.stats](https://docs.maximem.ai/sdk-reference/cache/stats.md): inspect hit rate and entry counts.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.