# Reset System APIs Cache Example

> Demonstrates resetting cache for system APIs with API Maker system examples.

Source: https://docs.apimaker.dev/v1/examples/sys/cache/resetCacheSystemApis.html

`g.sys.cache.resetCacheSystemApis` calls the [reset system API cache system API](https://docs.apimaker.dev/v1/docs/apis-all/system-apis/system-generated-reset-redis-cache-system-api.html) from your code.

### Reset cache of system API

Reset cache of system API using global object 'g'.
```ts
await g.sys.cache.resetCacheSystemApis("SYSTEM_API_NAME");
```

### Multi-tenant
- The cache of a system API called for one tenant of a [multi-tenant](https://docs.apimaker.dev/v1/docs/features/multi-tenant.html) instance, with the [x-am-tenant-username](https://docs.apimaker.dev/v1/docs/apis-all/header/requestHeader.html#x-am-tenant-username) header. Without a tenant, the cache of every tenant is reset too.

```ts
await g.sys.cache.resetCacheSystemApis({ name: "SYSTEM_API_NAME", tenantUsername: "acme" });
```

## Related

- [Reset system api cache system API](https://docs.apimaker.dev/v1/docs/apis-all/system-apis/system-generated-reset-redis-cache-system-api.html) · [Automatic caching](https://docs.apimaker.dev/v1/docs/features/automatic-caching.html) · [The global object g](https://docs.apimaker.dev/v1/docs/pre-defined-terms/global-object-g.html)
