# Remove Redis Key Example

> Example showing how to remove Redis keys to manage cache effectively.

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

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

### Remove redis keys

Remove redis key and its value using global object 'g'.
```ts
await g.sys.cache.removeKey("REDIS_KEY_NAME");
```

Remove multiple redis keys.
```ts
await g.sys.cache.removeKey(["REDIS_KEY_NAME", "ANOTHER_REDIS_KEY_NAME"]);
```

## Related

- [Remove redis key system API](https://docs.apimaker.dev/v1/docs/apis-all/system-apis/system-generated-remove-redis-key-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)
