> ## 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.

# cache.clear_user

> Clear all locally-cached SDK data for a single user. Useful for GDPR right-to-be-forgotten flows.

```python theme={null}
sdk.cache.clear_user(user_id)
```

`clear_user()` removes every cache entry whose user scope matches `user_id`, leaving other users' cached data untouched. Pair this with the durable memory deletion APIs to honor right-to-be-forgotten requests end-to-end: this call handles the SDK's local cache, while platform-side deletion ensures the user's stored memories are removed from Synap itself.

This is a synchronous method, no `await`.

### Parameters

<ParamField path="user_id" type="string" required>
  The external user identifier whose cached data should be dropped. Must match the `user_id` you originally passed to `fetch()`, `memories.create()`, or other scope-aware calls.
</ParamField>

### Returns

Returns `None`.

### Example

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

sdk = MaximemSynapSDK(api_key="synap_your_key_here")

# Part of a GDPR right-to-be-forgotten workflow.
sdk.cache.clear_user("user_789")
```

### Raises

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

### See also

* [cache.clear](/sdk-reference/cache/clear): drop the entire local cache.
* [cache.clear\_customer](/sdk-reference/cache/clear-customer): drop one customer's cached data.
* [cache.stats](/sdk-reference/cache/stats): inspect hit rate and entry counts.
